@galacean/effects-plugin-editor-gizmo 2.0.0-alpha.2 → 2.0.0-alpha.21
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/define.d.ts +1 -1
- package/dist/gizmo-component.d.ts +27 -8
- package/dist/gizmo-loader.d.ts +2 -3
- package/dist/gizmo-vfx-item.d.ts +3 -28
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2150 -1769
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +3 -4
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +2080 -1717
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/define.d.ts
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
|
-
import type { GeometryDrawMode, Mesh, Texture, VFXItem
|
|
2
|
-
import { ItemBehaviour, math } from '@galacean/effects';
|
|
1
|
+
import type { GeometryDrawMode, Mesh, Texture, VFXItem } from '@galacean/effects';
|
|
2
|
+
import { ItemBehaviour, Transform, math, spec } from '@galacean/effects';
|
|
3
3
|
import { GizmoSubType } from './define';
|
|
4
4
|
import { type EditorGizmoPlugin } from './gizmo-loader';
|
|
5
|
+
import type { GizmoItemBounding } from './gizmo-vfx-item';
|
|
6
|
+
type Vector3 = math.Vector3;
|
|
7
|
+
declare const Vector3: typeof math.Vector3;
|
|
5
8
|
export declare class GizmoComponent extends ItemBehaviour {
|
|
6
9
|
gizmoPlugin: EditorGizmoPlugin;
|
|
7
|
-
targetItem: VFXItem
|
|
10
|
+
targetItem: VFXItem;
|
|
8
11
|
needCreateModelContent: boolean;
|
|
12
|
+
target: string;
|
|
13
|
+
subType: GizmoSubType;
|
|
14
|
+
size: any;
|
|
15
|
+
contents?: Map<Mesh, Transform>;
|
|
16
|
+
boundingMap: Map<string, GizmoItemBounding>;
|
|
17
|
+
hitBounding?: {
|
|
18
|
+
key: string;
|
|
19
|
+
position: Vector3;
|
|
20
|
+
};
|
|
21
|
+
wireframeMesh: Mesh;
|
|
9
22
|
color: spec.vec3;
|
|
10
23
|
renderMode: GeometryDrawMode;
|
|
11
24
|
depthTest?: boolean;
|
|
@@ -25,21 +38,21 @@ export declare class GizmoComponent extends ItemBehaviour {
|
|
|
25
38
|
* @returns 几何体尺寸
|
|
26
39
|
*/
|
|
27
40
|
getDefaultSize(): {};
|
|
28
|
-
createModelContent(item: VFXItem
|
|
29
|
-
createParticleContent(item: VFXItem
|
|
41
|
+
createModelContent(item: VFXItem, meshesToAdd: Mesh[]): void;
|
|
42
|
+
createParticleContent(item: VFXItem, meshesToAdd: Mesh[]): void;
|
|
30
43
|
/**
|
|
31
44
|
* 创建 BoundingBox 几何体模型
|
|
32
45
|
* @param item - VFXItem
|
|
33
46
|
* @param meshesToAdd - 插件缓存的 Mesh 数组
|
|
34
47
|
*/
|
|
35
|
-
createBoundingBoxContent(item: VFXItem
|
|
48
|
+
createBoundingBoxContent(item: VFXItem, meshesToAdd: Mesh[]): void;
|
|
36
49
|
/**
|
|
37
50
|
* 创建基础几何体模型
|
|
38
51
|
* @param item - VFXItem
|
|
39
52
|
* @param meshesToAdd - 插件缓存的 Mesh 数组
|
|
40
53
|
* @param subType - GizmoSubType 类型
|
|
41
54
|
*/
|
|
42
|
-
createBasicContent(item: VFXItem
|
|
55
|
+
createBasicContent(item: VFXItem, meshesToAdd: Mesh[], subType: GizmoSubType, iconTextures?: Map<string, Texture>): void;
|
|
43
56
|
/**
|
|
44
57
|
* 创建组合几何体模型
|
|
45
58
|
* @param item - VFXItem
|
|
@@ -47,6 +60,12 @@ export declare class GizmoComponent extends ItemBehaviour {
|
|
|
47
60
|
* @param subType - GizmoSubType 类型
|
|
48
61
|
* @param iconTextures - XYZ 图标纹理(viewHelper 专用)
|
|
49
62
|
*/
|
|
50
|
-
createCombinationContent(item: VFXItem
|
|
63
|
+
createCombinationContent(item: VFXItem, meshesToAdd: Mesh[], subType: GizmoSubType, iconTextures?: Map<string, Texture>): void;
|
|
51
64
|
fromData(data: any): void;
|
|
65
|
+
/**
|
|
66
|
+
* 射线检测算法
|
|
67
|
+
* @returns 包含射线检测算法回调方法的参数
|
|
68
|
+
*/
|
|
69
|
+
private getHitTestParams;
|
|
52
70
|
}
|
|
71
|
+
export {};
|
package/dist/gizmo-loader.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Composition, Mesh, RenderFrame, Scene, Texture, VFXItem } from '@galacean/effects';
|
|
2
2
|
import { AbstractPlugin, RenderPass } from '@galacean/effects';
|
|
3
|
-
import { GizmoVFXItem } from './gizmo-vfx-item';
|
|
4
3
|
export declare const iconTextures: Map<string, Texture>;
|
|
5
4
|
export declare class EditorGizmoPlugin extends AbstractPlugin {
|
|
6
5
|
meshToAdd: Mesh[];
|
|
@@ -10,8 +9,8 @@ export declare class EditorGizmoPlugin extends AbstractPlugin {
|
|
|
10
9
|
static onPlayerDestroy(): void;
|
|
11
10
|
onCompositionConstructed(composition: Composition, scene: Scene): void;
|
|
12
11
|
onCompositionReset(composition: Composition): void;
|
|
13
|
-
onCompositionItemRemoved(composition: Composition, item: VFXItem
|
|
14
|
-
removeGizmoItem(composition: Composition, gizmoVFXItem:
|
|
12
|
+
onCompositionItemRemoved(composition: Composition, item: VFXItem): void;
|
|
13
|
+
removeGizmoItem(composition: Composition, gizmoVFXItem: VFXItem): void;
|
|
15
14
|
prepareRenderFrame(composition: Composition, renderFrame: RenderFrame): boolean;
|
|
16
15
|
getBehindRenderPass(pipeline: RenderFrame): RenderPass;
|
|
17
16
|
getEditorRenderPass(pipeline: RenderFrame): RenderPass;
|
package/dist/gizmo-vfx-item.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
type TriangleLike = math.TriangleLike;
|
|
1
|
+
import { math } from '@galacean/effects';
|
|
2
|
+
export type Ray = math.Ray;
|
|
3
|
+
export type TriangleLike = math.TriangleLike;
|
|
5
4
|
type Vector3 = math.Vector3;
|
|
6
5
|
declare const Vector3: typeof math.Vector3;
|
|
7
6
|
/**
|
|
@@ -46,28 +45,4 @@ export interface GizmoItemBoundingTriangle {
|
|
|
46
45
|
backfaceCulling?: boolean;
|
|
47
46
|
}
|
|
48
47
|
export type GizmoItemBounding = GizmoItemBoundingBox | GizmoItemBoundingSphere | GizmoItemBoundingTriangle | GizmoItemBoundingLine;
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
*/
|
|
52
|
-
export declare class GizmoVFXItem extends VFXItem<Mesh | undefined> {
|
|
53
|
-
target: number;
|
|
54
|
-
subType: GizmoSubType;
|
|
55
|
-
size: any;
|
|
56
|
-
contents?: Map<Mesh, Transform>;
|
|
57
|
-
targetItem?: VFXItem<any>;
|
|
58
|
-
boundingMap: Map<string, GizmoItemBounding>;
|
|
59
|
-
hitBounding?: {
|
|
60
|
-
key: string;
|
|
61
|
-
position: Vector3;
|
|
62
|
-
};
|
|
63
|
-
wireframeMesh?: Mesh;
|
|
64
|
-
constructor(engine: Engine, props?: VFXItemProps);
|
|
65
|
-
set content(content: Mesh | undefined);
|
|
66
|
-
get content(): Mesh | undefined;
|
|
67
|
-
/**
|
|
68
|
-
* 射线检测算法
|
|
69
|
-
* @returns 包含射线检测算法回调方法的参数
|
|
70
|
-
*/
|
|
71
|
-
getHitTestParams(): void | HitTestCustomParams;
|
|
72
|
-
}
|
|
73
48
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GizmoVFXItem } from './gizmo-vfx-item';
|
|
2
1
|
import { GizmoSubType } from './define';
|
|
3
2
|
import { GeometryType, createGeometry } from './geometry';
|
|
3
|
+
import { GizmoComponent } from './gizmo-component';
|
|
4
4
|
export { DirectionLightData } from './geometry/direction-light';
|
|
5
|
-
export { GizmoSubType, GeometryType,
|
|
5
|
+
export { GizmoSubType, GeometryType, GizmoComponent, createGeometry, };
|
|
6
6
|
export declare const version: string;
|