@galacean/effects-plugin-model 2.8.9 → 2.9.0-alpha.1
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 +17 -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 +17 -3
- package/dist/index.mjs.map +1 -1
- package/dist/loader.mjs +17 -3
- package/dist/loader.mjs.map +1 -1
- package/dist/plugin/model-item.d.ts +1 -0
- 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.
|
|
6
|
+
* Version: v2.9.0-alpha.1
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as EFFECTS from '@galacean/effects';
|
|
@@ -1512,7 +1512,7 @@ function getQuadFilterVS() {
|
|
|
1512
1512
|
duration: 9999999,
|
|
1513
1513
|
endBehavior: spec.END_BEHAVIOR_FORWARD
|
|
1514
1514
|
};
|
|
1515
|
-
var item = new VFXItem(composition.
|
|
1515
|
+
var item = new VFXItem(composition.engine, props);
|
|
1516
1516
|
composition.addItem(item);
|
|
1517
1517
|
var modelPluginComponent = item.addComponent(ModelPluginComponent);
|
|
1518
1518
|
modelPluginComponent.sceneParams = scene.storage;
|
|
@@ -2136,7 +2136,7 @@ var CameraGestureHandlerImp = /*#__PURE__*/ function() {
|
|
|
2136
2136
|
registerPlugin("model", ModelPlugin);
|
|
2137
2137
|
/**
|
|
2138
2138
|
* 插件版本号
|
|
2139
|
-
*/ var version = "2.
|
|
2139
|
+
*/ var version = "2.9.0-alpha.1";
|
|
2140
2140
|
logger.info("Plugin model version: " + version + ".");
|
|
2141
2141
|
if (version !== EFFECTS.version) {
|
|
2142
2142
|
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!");
|
|
@@ -2150,6 +2150,7 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
2150
2150
|
/**
|
|
2151
2151
|
* morph 动画权重
|
|
2152
2152
|
*/ _this.morphWeights = [];
|
|
2153
|
+
_this.firstUpdate = true;
|
|
2153
2154
|
/**
|
|
2154
2155
|
* 获取点击测试参数,根据元素包围盒进行相交测试,Mesh 对象会进行更加精确的点击测试
|
|
2155
2156
|
* @param force - 是否强制进行点击测试
|
|
@@ -2227,6 +2228,12 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
2227
2228
|
*/ _proto.onUpdate = function onUpdate(dt) {
|
|
2228
2229
|
if (this.sceneManager) {
|
|
2229
2230
|
this.content.build(this.sceneManager);
|
|
2231
|
+
if (this.firstUpdate) {
|
|
2232
|
+
this.materials = this.content.subMeshes.map(function(subMesh) {
|
|
2233
|
+
return subMesh.getEffectsMaterial();
|
|
2234
|
+
});
|
|
2235
|
+
this.firstUpdate = false;
|
|
2236
|
+
}
|
|
2230
2237
|
}
|
|
2231
2238
|
this.content.update();
|
|
2232
2239
|
};
|
|
@@ -2244,6 +2251,7 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
2244
2251
|
if (!this.getVisible() || !this.sceneManager) {
|
|
2245
2252
|
return;
|
|
2246
2253
|
}
|
|
2254
|
+
this.maskManager.drawStencilMask(renderer, this);
|
|
2247
2255
|
this.content.render(this.sceneManager, renderer);
|
|
2248
2256
|
};
|
|
2249
2257
|
/**
|
|
@@ -2348,6 +2356,11 @@ var ModelSkyboxComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
2348
2356
|
this.sceneManager = getSceneManager(this);
|
|
2349
2357
|
(_this_sceneManager = this.sceneManager) == null ? void 0 : _this_sceneManager.addItem(this.content);
|
|
2350
2358
|
this.setVisible(true);
|
|
2359
|
+
if (this.content.skyboxMesh) {
|
|
2360
|
+
this.materials = [
|
|
2361
|
+
this.content.skyboxMesh.material
|
|
2362
|
+
];
|
|
2363
|
+
}
|
|
2351
2364
|
};
|
|
2352
2365
|
/**
|
|
2353
2366
|
* 组件渲染,需要检查可见性
|
|
@@ -2357,6 +2370,7 @@ var ModelSkyboxComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
2357
2370
|
if (!this.getVisible() || !this.sceneManager) {
|
|
2358
2371
|
return;
|
|
2359
2372
|
}
|
|
2373
|
+
this.maskManager.drawStencilMask(renderer, this);
|
|
2360
2374
|
this.content.render(this.sceneManager, renderer);
|
|
2361
2375
|
};
|
|
2362
2376
|
/**
|