@galacean/effects-plugin-editor-gizmo 2.0.0-alpha.30 → 2.0.0-alpha.31
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/gizmo-component.d.ts +1 -0
- package/dist/index.js +17 -13
- 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 +18 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects player editor gizmo plugin
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 茂安,旻诺
|
|
6
|
-
* Version: v2.0.0-alpha.
|
|
6
|
+
* Version: v2.0.0-alpha.31
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -3104,9 +3104,23 @@ exports.GizmoComponent = /*#__PURE__*/ function(RendererComponent1) {
|
|
|
3104
3104
|
}
|
|
3105
3105
|
composition.loaderData.gizmoItems.push(this.item);
|
|
3106
3106
|
};
|
|
3107
|
-
_proto.
|
|
3107
|
+
_proto.update = function update(dt) {
|
|
3108
3108
|
this.updateRenderData();
|
|
3109
3109
|
};
|
|
3110
|
+
_proto.render = function render(renderer) {
|
|
3111
|
+
// The material of the 3D plugin is updated during the render phase. In order to obtain the correct value, it is kept consistent here.
|
|
3112
|
+
if (this.subType === exports.GizmoSubType.modelWireframe) {
|
|
3113
|
+
if (this.wireframeMesh && this.targetItem) {
|
|
3114
|
+
var _this_targetItem_getComponent;
|
|
3115
|
+
//@ts-expect-error TODO 和 3D 类型解耦
|
|
3116
|
+
var meshes = (_this_targetItem_getComponent = this.targetItem.getComponent(EFFECTS.RendererComponent)) == null ? void 0 : _this_targetItem_getComponent.content.subMeshes;
|
|
3117
|
+
var wireframeMeshes = this.wireframeMeshes;
|
|
3118
|
+
if ((meshes == null ? void 0 : meshes.length) > 0) {
|
|
3119
|
+
updateWireframeMesh(meshes[0].geometry.geometry, meshes[0].material.effectMaterial, wireframeMeshes[0], WireframeGeometryType.triangle);
|
|
3120
|
+
}
|
|
3121
|
+
}
|
|
3122
|
+
}
|
|
3123
|
+
};
|
|
3110
3124
|
_proto.updateRenderData = function updateRenderData() {
|
|
3111
3125
|
var item = this.item;
|
|
3112
3126
|
var gizmoSubType = this.subType;
|
|
@@ -3123,16 +3137,6 @@ exports.GizmoComponent = /*#__PURE__*/ function(RendererComponent1) {
|
|
|
3123
3137
|
this.wireframeMesh.worldMatrix = particle.particleMesh.mesh.worldMatrix;
|
|
3124
3138
|
}
|
|
3125
3139
|
}
|
|
3126
|
-
} else if (gizmoSubType === exports.GizmoSubType.modelWireframe) {
|
|
3127
|
-
if (this.wireframeMesh && this.targetItem) {
|
|
3128
|
-
var _this_targetItem_getComponent;
|
|
3129
|
-
//@ts-expect-error TODO 和 3D 类型解耦
|
|
3130
|
-
var meshes = (_this_targetItem_getComponent = this.targetItem.getComponent(EFFECTS.RendererComponent)) == null ? void 0 : _this_targetItem_getComponent.content.subMeshes;
|
|
3131
|
-
var wireframeMeshes = this.wireframeMeshes;
|
|
3132
|
-
if ((meshes == null ? void 0 : meshes.length) > 0) {
|
|
3133
|
-
updateWireframeMesh(meshes[0].geometry.geometry, meshes[0].material.effectMaterial, wireframeMeshes[0], WireframeGeometryType.triangle);
|
|
3134
|
-
}
|
|
3135
|
-
}
|
|
3136
3140
|
} else {
|
|
3137
3141
|
if (this.targetItem) {
|
|
3138
3142
|
if (this.contents) {
|
|
@@ -3712,7 +3716,7 @@ var EditorGizmoPlugin = /*#__PURE__*/ function(AbstractPlugin) {
|
|
|
3712
3716
|
}(EFFECTS.AbstractPlugin);
|
|
3713
3717
|
|
|
3714
3718
|
EFFECTS.registerPlugin("editor-gizmo", EditorGizmoPlugin, EFFECTS.VFXItem);
|
|
3715
|
-
var version = "2.0.0-alpha.
|
|
3719
|
+
var version = "2.0.0-alpha.31";
|
|
3716
3720
|
EFFECTS.logger.info("Plugin editor gizmo version: " + version + ".");
|
|
3717
3721
|
if (version !== EFFECTS__namespace.version) {
|
|
3718
3722
|
console.error("注意:请统一 Editor Gizmo 插件与 Player 版本,不统一的版本混用会有不可预知的后果!", "\nAttention: Please ensure the Editor Gizmo plugin is synchronized with the Player version. Mixing and matching incompatible versions may result in unpredictable consequences!");
|