@galacean/effects-plugin-editor-gizmo 2.10.0-alpha.1 → 2.10.0-alpha.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/index.js +27 -54
- 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 +28 -55
- package/dist/index.mjs.map +1 -1
- package/dist/wireframe.d.ts +4 -10
- 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.10.0-alpha.
|
|
6
|
+
* Version: v2.10.0-alpha.2
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -2794,63 +2794,36 @@ function getTriangleIndexData(oid) {
|
|
|
2794
2794
|
}
|
|
2795
2795
|
return indexData;
|
|
2796
2796
|
}
|
|
2797
|
-
var SharedGeometry = /*#__PURE__*/ function(
|
|
2798
|
-
_inherits(SharedGeometry,
|
|
2797
|
+
var SharedGeometry = /*#__PURE__*/ function(Geometry) {
|
|
2798
|
+
_inherits(SharedGeometry, Geometry);
|
|
2799
2799
|
function SharedGeometry(engine, options) {
|
|
2800
2800
|
var _this;
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
var
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
}
|
|
2801
|
+
var _options_index;
|
|
2802
|
+
var source = options.geometry;
|
|
2803
|
+
var _options_index_data;
|
|
2804
|
+
var sourceIndex = (_options_index_data = (_options_index = options.index) == null ? void 0 : _options_index.data) != null ? _options_index_data : source.getIndexData();
|
|
2805
|
+
var indexData = sourceIndex == null ? void 0 : sourceIndex.slice();
|
|
2806
|
+
var _options_drawStart, _options_drawCount, _options_mode;
|
|
2807
|
+
_this = Geometry.call(this, engine, {
|
|
2808
|
+
name: options.name,
|
|
2809
|
+
attributes: {},
|
|
2810
|
+
indices: indexData ? {
|
|
2811
|
+
data: indexData
|
|
2812
|
+
} : undefined,
|
|
2813
|
+
drawStart: (_options_drawStart = options.drawStart) != null ? _options_drawStart : 0,
|
|
2814
|
+
drawCount: (_options_drawCount = options.drawCount) != null ? _options_drawCount : 0,
|
|
2815
|
+
mode: (_options_mode = options.mode) != null ? _options_mode : 0
|
|
2816
|
+
}) || this;
|
|
2817
|
+
source.getAttributeNames().forEach(function(name) {
|
|
2818
|
+
var vertexBuffer = source.getVertexBuffer(name);
|
|
2819
|
+
if (vertexBuffer) {
|
|
2820
|
+
_this.setVerticesBuffer(vertexBuffer);
|
|
2821
|
+
}
|
|
2822
|
+
});
|
|
2817
2823
|
return _this;
|
|
2818
2824
|
}
|
|
2819
|
-
var _proto = SharedGeometry.prototype;
|
|
2820
|
-
_proto.initialize = function initialize() {
|
|
2821
|
-
if (!this.isInitialized) {
|
|
2822
|
-
var geometry = this.source;
|
|
2823
|
-
geometry.initialize();
|
|
2824
|
-
//this.indicesBuffer = this._source.indicesBuffer;
|
|
2825
|
-
this.buffers = this.source.buffers;
|
|
2826
|
-
this.bufferProps = this.source.bufferProps;
|
|
2827
|
-
//this.dirtyFlags = this._source.dirtyFlags;
|
|
2828
|
-
//this.vaos = this._source.vaos;
|
|
2829
|
-
//创建ibo
|
|
2830
|
-
if (this.indices) {
|
|
2831
|
-
this.indicesBuffer = this.createIndicesBuffer(this.indices);
|
|
2832
|
-
}
|
|
2833
|
-
this.flush();
|
|
2834
|
-
this.initialized = true;
|
|
2835
|
-
}
|
|
2836
|
-
};
|
|
2837
|
-
_proto.getAttributeNames = function getAttributeNames() {
|
|
2838
|
-
return this.source.getAttributeNames();
|
|
2839
|
-
};
|
|
2840
|
-
_proto.flush = function flush() {
|
|
2841
|
-
this.source.flush();
|
|
2842
|
-
GLGeometry.prototype.flush.call(this);
|
|
2843
|
-
};
|
|
2844
|
-
_proto.dispose = function dispose() {
|
|
2845
|
-
// from source geometry
|
|
2846
|
-
this.buffers = {};
|
|
2847
|
-
this.bufferProps = {};
|
|
2848
|
-
GLGeometry.prototype.dispose.call(this);
|
|
2849
|
-
// @ts-expect-error
|
|
2850
|
-
this.source = null;
|
|
2851
|
-
};
|
|
2852
2825
|
return SharedGeometry;
|
|
2853
|
-
}(EFFECTS.
|
|
2826
|
+
}(EFFECTS.Geometry);
|
|
2854
2827
|
|
|
2855
2828
|
var editorRenderPassName = "editor-gizmo";
|
|
2856
2829
|
var frontRenderPassName = "front-gizmo";
|
|
@@ -3724,7 +3697,7 @@ var EditorGizmoPlugin = /*#__PURE__*/ function(Plugin) {
|
|
|
3724
3697
|
EFFECTS.registerPlugin("editor-gizmo", EditorGizmoPlugin);
|
|
3725
3698
|
/**
|
|
3726
3699
|
* 插件版本号
|
|
3727
|
-
*/ var version = "2.10.0-alpha.
|
|
3700
|
+
*/ var version = "2.10.0-alpha.2";
|
|
3728
3701
|
EFFECTS.logger.info("Plugin editor gizmo version: " + version + ".");
|
|
3729
3702
|
if (version !== EFFECTS__namespace.version) {
|
|
3730
3703
|
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!");
|