@galacean/effects-plugin-editor-gizmo 2.7.3 → 2.8.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/gizmo-component.d.ts +15 -12
- package/dist/gizmo-loader.d.ts +2 -10
- package/dist/index.js +463 -520
- 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 +476 -533
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { GeometryDrawMode, Renderer, Texture, VFXItem } from '@galacean/effects';
|
|
2
|
-
import { Mesh } from '@galacean/effects';
|
|
3
|
-
import { RendererComponent, Transform, math, spec } from '@galacean/effects';
|
|
1
|
+
import type { GeometryDrawMode, RenderFrame, Renderer, Texture, VFXItem } from '@galacean/effects';
|
|
2
|
+
import { RenderPass, Mesh, RendererComponent, Transform, math, spec } from '@galacean/effects';
|
|
4
3
|
import { GizmoSubType } from './define';
|
|
5
|
-
import {
|
|
4
|
+
import type { EditorGizmoPlugin } from './gizmo-loader';
|
|
6
5
|
import type { GizmoItemBounding } from './gizmo-vfx-item';
|
|
7
6
|
type Vector3 = math.Vector3;
|
|
8
7
|
declare const Vector3: typeof math.Vector3;
|
|
@@ -26,9 +25,13 @@ export declare class GizmoComponent extends RendererComponent {
|
|
|
26
25
|
depthTest?: boolean;
|
|
27
26
|
mat: math.Matrix4;
|
|
28
27
|
wireframeMeshes: Mesh[];
|
|
28
|
+
meshes: Mesh[];
|
|
29
29
|
mesh: Mesh | null;
|
|
30
30
|
onStart(): void;
|
|
31
|
+
onEnable(): void;
|
|
32
|
+
onDisable(): void;
|
|
31
33
|
onUpdate(dt: number): void;
|
|
34
|
+
onDestroy(): void;
|
|
32
35
|
render(renderer: Renderer): void;
|
|
33
36
|
updateRenderData(): void;
|
|
34
37
|
/**
|
|
@@ -41,35 +44,35 @@ export declare class GizmoComponent extends RendererComponent {
|
|
|
41
44
|
* @returns 几何体尺寸
|
|
42
45
|
*/
|
|
43
46
|
getDefaultSize(): {};
|
|
44
|
-
createModelContent(item: VFXItem
|
|
45
|
-
createParticleContent(item: VFXItem
|
|
47
|
+
createModelContent(item: VFXItem): void;
|
|
48
|
+
createParticleContent(item: VFXItem): void;
|
|
46
49
|
/**
|
|
47
50
|
* 创建 BoundingBox 几何体模型
|
|
48
51
|
* @param item - VFXItem
|
|
49
|
-
* @param meshesToAdd - 插件缓存的 Mesh 数组
|
|
50
52
|
*/
|
|
51
|
-
createBoundingBoxContent(item: VFXItem
|
|
53
|
+
createBoundingBoxContent(item: VFXItem): void;
|
|
52
54
|
/**
|
|
53
55
|
* 创建基础几何体模型
|
|
54
56
|
* @param item - VFXItem
|
|
55
|
-
* @param meshesToAdd - 插件缓存的 Mesh 数组
|
|
56
57
|
* @param subType - GizmoSubType 类型
|
|
57
58
|
*/
|
|
58
|
-
createBasicContent(item: VFXItem,
|
|
59
|
+
createBasicContent(item: VFXItem, subType: GizmoSubType, iconTextures?: Map<string, Texture>): void;
|
|
59
60
|
/**
|
|
60
61
|
* 创建组合几何体模型
|
|
61
62
|
* @param item - VFXItem
|
|
62
|
-
* @param meshesToAdd - 插件缓存的 Mesh 数组
|
|
63
63
|
* @param subType - GizmoSubType 类型
|
|
64
64
|
* @param iconTextures - XYZ 图标纹理(viewHelper 专用)
|
|
65
65
|
*/
|
|
66
|
-
createCombinationContent(item: VFXItem,
|
|
66
|
+
createCombinationContent(item: VFXItem, subType: GizmoSubType, iconTextures?: Map<string, Texture>): void;
|
|
67
67
|
fromData(data: any): void;
|
|
68
68
|
/**
|
|
69
69
|
* 射线检测算法
|
|
70
70
|
* @returns 包含射线检测算法回调方法的参数
|
|
71
71
|
*/
|
|
72
72
|
private getHitTestParams;
|
|
73
|
+
getBehindRenderPass(pipeline: RenderFrame): RenderPass;
|
|
74
|
+
getEditorRenderPass(pipeline: RenderFrame): RenderPass;
|
|
75
|
+
getFrontRenderPass(pipeline: RenderFrame): RenderPass;
|
|
73
76
|
}
|
|
74
77
|
export declare enum CoordinateSpace {
|
|
75
78
|
Local = 0,
|
package/dist/gizmo-loader.d.ts
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import type { Composition,
|
|
2
|
-
import { AbstractPlugin
|
|
1
|
+
import type { Composition, Scene, Texture } from '@galacean/effects';
|
|
2
|
+
import { AbstractPlugin } from '@galacean/effects';
|
|
3
3
|
export declare const iconTextures: Map<string, Texture>;
|
|
4
4
|
export declare class EditorGizmoPlugin extends AbstractPlugin {
|
|
5
|
-
meshToAdd: Mesh[];
|
|
6
|
-
meshToRemove: Mesh[];
|
|
7
5
|
order: number;
|
|
8
6
|
static prepareResource(scene: Scene): Promise<any>;
|
|
9
7
|
onCompositionConstructed(composition: Composition, scene: Scene): void;
|
|
10
8
|
onCompositionReset(composition: Composition): void;
|
|
11
|
-
onCompositionItemRemoved(composition: Composition, item: VFXItem): void;
|
|
12
|
-
removeGizmoItem(composition: Composition, gizmoVFXItem: VFXItem): void;
|
|
13
|
-
prepareRenderFrame(composition: Composition, renderFrame: RenderFrame): boolean;
|
|
14
|
-
getBehindRenderPass(pipeline: RenderFrame): RenderPass;
|
|
15
|
-
getEditorRenderPass(pipeline: RenderFrame): RenderPass;
|
|
16
|
-
getFrontRenderPass(pipeline: RenderFrame): RenderPass;
|
|
17
9
|
}
|