@galacean/effects-plugin-model 2.8.9 → 2.9.0-alpha.0
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 +16 -2
- 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 +16 -2
- package/dist/index.mjs.map +1 -1
- package/dist/loader.mjs +16 -2
- 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/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.
|
|
6
|
+
* Version: v2.9.0-alpha.0
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as EFFECTS from '@galacean/effects';
|
|
@@ -1821,6 +1821,7 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
1821
1821
|
/**
|
|
1822
1822
|
* morph 动画权重
|
|
1823
1823
|
*/ _this.morphWeights = [];
|
|
1824
|
+
_this.firstUpdate = true;
|
|
1824
1825
|
/**
|
|
1825
1826
|
* 获取点击测试参数,根据元素包围盒进行相交测试,Mesh 对象会进行更加精确的点击测试
|
|
1826
1827
|
* @param force - 是否强制进行点击测试
|
|
@@ -1898,6 +1899,12 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
1898
1899
|
*/ _proto.onUpdate = function onUpdate(dt) {
|
|
1899
1900
|
if (this.sceneManager) {
|
|
1900
1901
|
this.content.build(this.sceneManager);
|
|
1902
|
+
if (this.firstUpdate) {
|
|
1903
|
+
this.materials = this.content.subMeshes.map(function(subMesh) {
|
|
1904
|
+
return subMesh.getEffectsMaterial();
|
|
1905
|
+
});
|
|
1906
|
+
this.firstUpdate = false;
|
|
1907
|
+
}
|
|
1901
1908
|
}
|
|
1902
1909
|
this.content.update();
|
|
1903
1910
|
};
|
|
@@ -1915,6 +1922,7 @@ var ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
1915
1922
|
if (!this.getVisible() || !this.sceneManager) {
|
|
1916
1923
|
return;
|
|
1917
1924
|
}
|
|
1925
|
+
this.maskManager.drawStencilMask(renderer, this);
|
|
1918
1926
|
this.content.render(this.sceneManager, renderer);
|
|
1919
1927
|
};
|
|
1920
1928
|
/**
|
|
@@ -2019,6 +2027,11 @@ var ModelSkyboxComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
2019
2027
|
this.sceneManager = getSceneManager(this);
|
|
2020
2028
|
(_this_sceneManager = this.sceneManager) == null ? void 0 : _this_sceneManager.addItem(this.content);
|
|
2021
2029
|
this.setVisible(true);
|
|
2030
|
+
if (this.content.skyboxMesh) {
|
|
2031
|
+
this.materials = [
|
|
2032
|
+
this.content.skyboxMesh.material
|
|
2033
|
+
];
|
|
2034
|
+
}
|
|
2022
2035
|
};
|
|
2023
2036
|
/**
|
|
2024
2037
|
* 组件渲染,需要检查可见性
|
|
@@ -2028,6 +2041,7 @@ var ModelSkyboxComponent = /*#__PURE__*/ function(RendererComponent) {
|
|
|
2028
2041
|
if (!this.getVisible() || !this.sceneManager) {
|
|
2029
2042
|
return;
|
|
2030
2043
|
}
|
|
2044
|
+
this.maskManager.drawStencilMask(renderer, this);
|
|
2031
2045
|
this.content.render(this.sceneManager, renderer);
|
|
2032
2046
|
};
|
|
2033
2047
|
/**
|
|
@@ -13174,7 +13188,7 @@ var GLTFHelper = /*#__PURE__*/ function() {
|
|
|
13174
13188
|
registerPlugin("model", ModelPlugin);
|
|
13175
13189
|
/**
|
|
13176
13190
|
* 插件版本号
|
|
13177
|
-
*/ var version = "2.
|
|
13191
|
+
*/ var version = "2.9.0-alpha.0";
|
|
13178
13192
|
logger.info("Plugin model version: " + version + ".");
|
|
13179
13193
|
if (version !== EFFECTS.version) {
|
|
13180
13194
|
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!");
|