@galacean/effects-plugin-editor-gizmo 2.10.3 → 2.11.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/README.md +37 -5
- package/dist/2d/configs/builtin-configs.d.ts +14 -0
- package/dist/2d/configs/config-definition.d.ts +40 -0
- package/dist/2d/configs/config-manager.d.ts +52 -0
- package/dist/2d/configs/index.d.ts +6 -0
- package/dist/2d/configs/loading-config.d.ts +3 -0
- package/dist/2d/configs/types.d.ts +321 -0
- package/dist/2d/cursor-icons.d.ts +8 -0
- package/dist/2d/cursor.d.ts +36 -0
- package/dist/2d/drag-threshold.d.ts +13 -0
- package/dist/2d/drawing.d.ts +148 -0
- package/dist/2d/frame/frame-assisted-layout.d.ts +115 -0
- package/dist/2d/frame/frame-auto-layout.d.ts +47 -0
- package/dist/2d/frame/frame-manager.d.ts +169 -0
- package/dist/2d/frame/frame-resize.d.ts +13 -0
- package/dist/2d/frame/index.d.ts +5 -0
- package/dist/2d/frame/layout-calculations.d.ts +109 -0
- package/dist/2d/frame/types.d.ts +41 -0
- package/dist/2d/gesture-handler.d.ts +253 -0
- package/dist/2d/gizmo-action.d.ts +159 -0
- package/dist/2d/gizmo-manager.d.ts +105 -0
- package/dist/2d/gizmo-owner.d.ts +65 -0
- package/dist/2d/gizmo-tool.d.ts +15 -0
- package/dist/2d/gizmo-tools/hand-gizmo-tool.d.ts +4 -0
- package/dist/2d/gizmo-tools/image-cut-gizmo-tool.d.ts +7 -0
- package/dist/2d/gizmo-tools/image-expand-gizmo-tool.d.ts +7 -0
- package/dist/2d/gizmo-tools/index.d.ts +7 -0
- package/dist/2d/gizmo-tools/item-create-gizmo-tool.d.ts +10 -0
- package/dist/2d/gizmo-tools/mask-gizmo-tool.d.ts +7 -0
- package/dist/2d/gizmo-tools/move-gizmo-tool.d.ts +6 -0
- package/dist/2d/gizmo-tools/sprite-text-edit-gizmo-tool.d.ts +7 -0
- package/dist/2d/gizmo-type.d.ts +37 -0
- package/dist/2d/gizmo.d.ts +60 -0
- package/dist/2d/gizmos/box-selection-gizmo.d.ts +67 -0
- package/dist/2d/gizmos/change-selection-gizmo.d.ts +45 -0
- package/dist/2d/gizmos/click-drag-multiplex-gizmo.d.ts +95 -0
- package/dist/2d/gizmos/corner-rotation-gizmo.d.ts +101 -0
- package/dist/2d/gizmos/enter-edit-mode-gizmo.d.ts +11 -0
- package/dist/2d/gizmos/hand-gizmo.d.ts +67 -0
- package/dist/2d/gizmos/icon-gizmo.d.ts +107 -0
- package/dist/2d/gizmos/image-cut-gizmo.d.ts +140 -0
- package/dist/2d/gizmos/image-expand-gizmo.d.ts +135 -0
- package/dist/2d/gizmos/image-interaction.d.ts +40 -0
- package/dist/2d/gizmos/item-create-gizmo.d.ts +146 -0
- package/dist/2d/gizmos/leave-effects-edit-gizmo.d.ts +11 -0
- package/dist/2d/gizmos/leave-text-edit-gizmo.d.ts +11 -0
- package/dist/2d/gizmos/loading-gizmo.d.ts +110 -0
- package/dist/2d/gizmos/loading-manager.d.ts +74 -0
- package/dist/2d/gizmos/mask-gizmo.d.ts +153 -0
- package/dist/2d/gizmos/move-selection-gizmo.d.ts +64 -0
- package/dist/2d/gizmos/resize-selection-gizmo/anchored-resize.d.ts +40 -0
- package/dist/2d/gizmos/resize-selection-gizmo/index.d.ts +2 -0
- package/dist/2d/gizmos/resize-selection-gizmo/resize-selection-gizmo.d.ts +364 -0
- package/dist/2d/gizmos/resize-selection-gizmo/transform-types.d.ts +27 -0
- package/dist/2d/gizmos/select-text-gizmo.d.ts +77 -0
- package/dist/2d/gizmos/sprite-text-edit-gizmo.d.ts +149 -0
- package/dist/2d/gizmos/text-gizmo.d.ts +65 -0
- package/dist/2d/gizmos/viewport-overlay-gizmo.d.ts +66 -0
- package/dist/2d/index.d.ts +44 -0
- package/dist/2d/items/default-vfx-items.d.ts +45 -0
- package/dist/2d/items/index.d.ts +6 -0
- package/dist/2d/items/item-geometry.d.ts +69 -0
- package/dist/2d/items/item-hierarchy.d.ts +39 -0
- package/dist/2d/items/item-predicates.d.ts +31 -0
- package/dist/2d/items/media-controls.d.ts +39 -0
- package/dist/2d/items/vfx-item-factory.d.ts +13 -0
- package/dist/2d/math/core.d.ts +26 -0
- package/dist/2d/math/geometry.d.ts +83 -0
- package/dist/2d/math/index.d.ts +4 -0
- package/dist/2d/math/ray-caster.d.ts +56 -0
- package/dist/2d/math/utils.d.ts +6 -0
- package/dist/2d/modes/default-selection-mode.d.ts +19 -0
- package/dist/2d/modes/edit-mode.d.ts +18 -0
- package/dist/2d/modes/effects-edit-mode.d.ts +34 -0
- package/dist/2d/modes/index.d.ts +4 -0
- package/dist/2d/modes/text-edit-mode.d.ts +34 -0
- package/dist/2d/selection/create-selection-interaction-gizmo.d.ts +14 -0
- package/dist/2d/selection/index.d.ts +3 -0
- package/dist/2d/selection/selection.d.ts +338 -0
- package/dist/2d/selection/snap-manager.d.ts +130 -0
- package/dist/2d/text/index.d.ts +2 -0
- package/dist/2d/text/text-caret-mapper.d.ts +61 -0
- package/dist/2d/text/text-edit-session.d.ts +169 -0
- package/dist/2d/viewport/coordinates.d.ts +89 -0
- package/dist/2d/viewport/gizmo-viewport.d.ts +108 -0
- package/dist/2d/viewport/index.d.ts +6 -0
- package/dist/2d/viewport/types.d.ts +11 -0
- package/dist/2d/viewport/viewport-navigation-controller.d.ts +110 -0
- package/dist/2d/viewport/viewport-operations.d.ts +15 -0
- package/dist/2d/viewport/viewport-range.d.ts +9 -0
- package/dist/2d/viewport/viewport-utils.d.ts +32 -0
- package/dist/{gizmo-component.d.ts → 3d/gizmo-component.d.ts} +3 -5
- package/dist/3d/index.d.ts +4 -0
- package/dist/index.d.ts +2 -5
- package/dist/index.js +15030 -171
- 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 +14871 -173
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -3
- /package/dist/{constants.d.ts → 3d/constants.d.ts} +0 -0
- /package/dist/{define.d.ts → 3d/define.d.ts} +0 -0
- /package/dist/{geometry → 3d/geometry}/box.d.ts +0 -0
- /package/dist/{geometry → 3d/geometry}/cone.d.ts +0 -0
- /package/dist/{geometry → 3d/geometry}/cylinder.d.ts +0 -0
- /package/dist/{geometry → 3d/geometry}/direction-light.d.ts +0 -0
- /package/dist/{geometry → 3d/geometry}/floor-line-edge.d.ts +0 -0
- /package/dist/{geometry → 3d/geometry}/floor-line.d.ts +0 -0
- /package/dist/{geometry → 3d/geometry}/frustum.d.ts +0 -0
- /package/dist/{geometry → 3d/geometry}/geometry.d.ts +0 -0
- /package/dist/{geometry → 3d/geometry}/index.d.ts +0 -0
- /package/dist/{geometry → 3d/geometry}/plane.d.ts +0 -0
- /package/dist/{geometry → 3d/geometry}/point-light.d.ts +0 -0
- /package/dist/{geometry → 3d/geometry}/sphere.d.ts +0 -0
- /package/dist/{geometry → 3d/geometry}/spot-light.d.ts +0 -0
- /package/dist/{geometry → 3d/geometry}/torus.d.ts +0 -0
- /package/dist/{gizmo-loader.d.ts → 3d/gizmo-loader.d.ts} +0 -0
- /package/dist/{gizmo-vfx-item.d.ts → 3d/gizmo-vfx-item.d.ts} +0 -0
- /package/dist/{math-utils.d.ts → 3d/math-utils.d.ts} +0 -0
- /package/dist/{mesh.d.ts → 3d/mesh.d.ts} +0 -0
- /package/dist/{raycast.d.ts → 3d/raycast.d.ts} +0 -0
- /package/dist/{shape.d.ts → 3d/shape.d.ts} +0 -0
- /package/dist/{util.d.ts → 3d/util.d.ts} +0 -0
- /package/dist/{wireframe.d.ts → 3d/wireframe.d.ts} +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Engine } from '@galacean/effects';
|
|
2
|
+
import { Vector2 } from '../math';
|
|
3
|
+
/**
|
|
4
|
+
* 缩放视图。
|
|
5
|
+
* @param engine 引擎
|
|
6
|
+
* @param zoom 缩放值
|
|
7
|
+
* @param center 缩放中心
|
|
8
|
+
*/
|
|
9
|
+
export declare function zoomView(engine: Engine, zoom: number, center?: Vector2): void;
|
|
10
|
+
/**
|
|
11
|
+
* 平移视图。
|
|
12
|
+
* @param engine 引擎
|
|
13
|
+
* @param translation 位移值
|
|
14
|
+
*/
|
|
15
|
+
export declare function panView(engine: Engine, translation: Vector2): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Vector2 } from '../math';
|
|
2
|
+
import { Box2 } from '@galacean/effects-math/es/extension/index';
|
|
3
|
+
/**
|
|
4
|
+
* 计算内容两端分别对齐视口两端时的平移区间。
|
|
5
|
+
* @param bounds 相对视口中心、scale=1 时的内容边界
|
|
6
|
+
* @param scale 当前缩放
|
|
7
|
+
* @param size 视口像素尺寸
|
|
8
|
+
*/
|
|
9
|
+
export declare function getViewportTranslationRange(bounds: Box2, scale: number, size: Vector2): Box2;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type Engine } from '@galacean/effects';
|
|
2
|
+
import { Matrix4, Vector2, Vector3 } from '../math';
|
|
3
|
+
/** 读取 Gizmo 使用的当前视口和相机参数。 */
|
|
4
|
+
export declare class GizmoViewportUtils {
|
|
5
|
+
/**
|
|
6
|
+
* 获取视口缩放。
|
|
7
|
+
* @param engine Effects 引擎
|
|
8
|
+
* @returns 视口缩放;无相机时返回 1
|
|
9
|
+
*/
|
|
10
|
+
static getViewScale(engine: Engine): number;
|
|
11
|
+
/**
|
|
12
|
+
* 获取 NDC 坐标系中的视口平移。
|
|
13
|
+
* @param engine Effects 引擎
|
|
14
|
+
* @returns 视口平移;无相机时返回零向量
|
|
15
|
+
*/
|
|
16
|
+
static getViewportTranslation(engine: Engine): Vector2;
|
|
17
|
+
/**
|
|
18
|
+
* 获取相机位置和逆视投影矩阵。
|
|
19
|
+
* @param engine Effects 引擎
|
|
20
|
+
* @returns 相机信息;无相机时返回零位姿
|
|
21
|
+
*/
|
|
22
|
+
static getCameraInfo(engine: Engine): {
|
|
23
|
+
position: Vector3;
|
|
24
|
+
matrix: Matrix4;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* 获取 DOM 容器尺寸。
|
|
28
|
+
* @param container DOM 容器
|
|
29
|
+
* @returns 容器宽高
|
|
30
|
+
*/
|
|
31
|
+
static getContainerSize(container: HTMLElement): Vector2;
|
|
32
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { GeometryDrawMode,
|
|
2
|
-
import {
|
|
1
|
+
import type { GeometryDrawMode, Renderer, Texture, VFXItem } from '@galacean/effects';
|
|
2
|
+
import { Mesh, RendererComponent, Transform, math, spec } from '@galacean/effects';
|
|
3
3
|
import type { GizmoVFXItemOptions } from './define';
|
|
4
4
|
import { GizmoSubType } from './define';
|
|
5
5
|
import type { EditorGizmoPlugin } from './gizmo-loader';
|
|
@@ -7,6 +7,7 @@ import type { GizmoItemBounding } from './gizmo-vfx-item';
|
|
|
7
7
|
interface GizmoComponentData extends spec.ComponentData {
|
|
8
8
|
options: GizmoVFXItemOptions;
|
|
9
9
|
transform?: Record<string, unknown>;
|
|
10
|
+
coordinateSpace?: CoordinateSpace;
|
|
10
11
|
}
|
|
11
12
|
type Vector3 = math.Vector3;
|
|
12
13
|
declare const Vector3: typeof math.Vector3;
|
|
@@ -75,9 +76,6 @@ export declare class GizmoComponent extends RendererComponent {
|
|
|
75
76
|
* @returns 包含射线检测算法回调方法的参数
|
|
76
77
|
*/
|
|
77
78
|
private getHitTestParams;
|
|
78
|
-
getBehindRenderPass(pipeline: RenderFrame): RenderPass;
|
|
79
|
-
getEditorRenderPass(pipeline: RenderFrame): RenderPass;
|
|
80
|
-
getFrontRenderPass(pipeline: RenderFrame): RenderPass;
|
|
81
79
|
}
|
|
82
80
|
export declare enum CoordinateSpace {
|
|
83
81
|
Local = 0,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export { DirectionLightData } from './geometry/direction-light';
|
|
4
|
-
export { GizmoSubType, GeometryType, createGeometry, };
|
|
5
|
-
export * from './gizmo-component';
|
|
1
|
+
export * from './2d';
|
|
2
|
+
export * from './3d';
|
|
6
3
|
/**
|
|
7
4
|
* 插件版本号
|
|
8
5
|
*/
|