@vvfx/artis 0.0.1-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.
Files changed (224) hide show
  1. package/LICENSE +22 -0
  2. package/dist/artis/artis.d.ts +44 -0
  3. package/dist/artis/base-artis.d.ts +520 -0
  4. package/dist/artis/canvas-layer-order.d.ts +19 -0
  5. package/dist/artis/create-info-to-schema.d.ts +21 -0
  6. package/dist/artis/index.d.ts +15 -0
  7. package/dist/artis/operations/index.d.ts +3 -0
  8. package/dist/artis/operations/operations.d.ts +362 -0
  9. package/dist/artis/operations/scene-operations.d.ts +26 -0
  10. package/dist/artis/operations/types.d.ts +39 -0
  11. package/dist/artis/scene-artis.d.ts +386 -0
  12. package/dist/artis/screenshot-service.d.ts +83 -0
  13. package/dist/artis/types.d.ts +130 -0
  14. package/dist/artis/wiring/index.d.ts +17 -0
  15. package/dist/artis/wiring/register-commands.d.ts +44 -0
  16. package/dist/artis/wiring/setup-commands.d.ts +5 -0
  17. package/dist/artis/wiring/setup-event-bindings.d.ts +16 -0
  18. package/dist/artis/wiring/setup-keybindings.d.ts +38 -0
  19. package/dist/artis/wiring/setup-plugins.d.ts +5 -0
  20. package/dist/artis/wiring/wiring-context.d.ts +34 -0
  21. package/dist/artis-sdk/artis-sdk.d.ts +1117 -0
  22. package/dist/artis-sdk/index.d.ts +1 -0
  23. package/dist/core/asset/asset-manager.d.ts +288 -0
  24. package/dist/core/asset/index.d.ts +3 -0
  25. package/dist/core/command/command-service.d.ts +315 -0
  26. package/dist/core/command/commands/composite-command.d.ts +45 -0
  27. package/dist/core/command/commands/frame-layout-command.d.ts +81 -0
  28. package/dist/core/command/commands/frame-layout-mode-command.d.ts +55 -0
  29. package/dist/core/command/commands/frame-move-in-command.d.ts +54 -0
  30. package/dist/core/command/commands/frame-move-out-command.d.ts +54 -0
  31. package/dist/core/command/commands/group-children-detach-command.d.ts +28 -0
  32. package/dist/core/command/commands/index.d.ts +98 -0
  33. package/dist/core/command/commands/item-align-command.d.ts +52 -0
  34. package/dist/core/command/commands/item-create-command.d.ts +66 -0
  35. package/dist/core/command/commands/item-delete-command.d.ts +40 -0
  36. package/dist/core/command/commands/item-distribute-command.d.ts +53 -0
  37. package/dist/core/command/commands/item-group-command.d.ts +41 -0
  38. package/dist/core/command/commands/item-reorder-command.d.ts +41 -0
  39. package/dist/core/command/commands/item-replace-source-command.d.ts +48 -0
  40. package/dist/core/command/commands/item-set-font-family-command.d.ts +46 -0
  41. package/dist/core/command/commands/item-set-generator-resource-command.d.ts +40 -0
  42. package/dist/core/command/commands/item-transform-command.d.ts +51 -0
  43. package/dist/core/command/commands/item-ungroup-command.d.ts +34 -0
  44. package/dist/core/command/commands/item-update-property-by-create-info-command.d.ts +41 -0
  45. package/dist/core/command/commands/item-update-property-command.d.ts +82 -0
  46. package/dist/core/command/commands/mask-commit-command.d.ts +53 -0
  47. package/dist/core/command/commands/page-auto-layout-command.d.ts +53 -0
  48. package/dist/core/command/commands/picture-cut-commit-command.d.ts +43 -0
  49. package/dist/core/command/commands/picture-expand-commit-command.d.ts +35 -0
  50. package/dist/core/command/commands/scene-switch-command.d.ts +35 -0
  51. package/dist/core/command/commands/selection-set-command.d.ts +38 -0
  52. package/dist/core/command/commands/sprite-image-command.d.ts +36 -0
  53. package/dist/core/command/commands/sprite-text-edit-commit-command.d.ts +43 -0
  54. package/dist/core/command/commands/state-hand-command.d.ts +14 -0
  55. package/dist/core/command/commands/state-image-cut-command.d.ts +14 -0
  56. package/dist/core/command/commands/state-image-expand-command.d.ts +14 -0
  57. package/dist/core/command/commands/state-image-mask-command.d.ts +15 -0
  58. package/dist/core/command/commands/state-image-text-edit-command.d.ts +14 -0
  59. package/dist/core/command/commands/state-item-create-command.d.ts +34 -0
  60. package/dist/core/command/commands/state-move-command.d.ts +14 -0
  61. package/dist/core/command/commands/state-switch-command-base.d.ts +41 -0
  62. package/dist/core/command/commands/text-move-command.d.ts +47 -0
  63. package/dist/core/command/commands/text-rotate-command.d.ts +52 -0
  64. package/dist/core/command/commands/text-scale-command.d.ts +56 -0
  65. package/dist/core/command/commands/text-update-content-command.d.ts +51 -0
  66. package/dist/core/command/commands/transform-move-command.d.ts +56 -0
  67. package/dist/core/command/commands/transform-move-with-frame-change-command.d.ts +80 -0
  68. package/dist/core/command/commands/transform-move-with-layout-command.d.ts +56 -0
  69. package/dist/core/command/commands/transform-rotate-command.d.ts +51 -0
  70. package/dist/core/command/commands/transform-scale-command.d.ts +54 -0
  71. package/dist/core/command/commands/video-play-command.d.ts +28 -0
  72. package/dist/core/command/commands/video-source-command.d.ts +39 -0
  73. package/dist/core/command/commands/viewport-fit-to-box-command.d.ts +37 -0
  74. package/dist/core/command/commands/viewport-fit-to-items-command.d.ts +43 -0
  75. package/dist/core/command/commands/viewport-move-command.d.ts +34 -0
  76. package/dist/core/command/commands/viewport-zoom-command.d.ts +35 -0
  77. package/dist/core/command/index.d.ts +5 -0
  78. package/dist/core/command/registry.d.ts +246 -0
  79. package/dist/core/command/types.d.ts +124 -0
  80. package/dist/core/element-registry/element-facade.d.ts +35 -0
  81. package/dist/core/element-registry/element-identity-strategy.d.ts +75 -0
  82. package/dist/core/element-registry/element-registry.d.ts +72 -0
  83. package/dist/core/element-registry/index.d.ts +5 -0
  84. package/dist/core/element-registry/types.d.ts +15 -0
  85. package/dist/core/gizmo/gizmo-bootstrap.d.ts +70 -0
  86. package/dist/core/gizmo/gizmo-command-binder.d.ts +55 -0
  87. package/dist/core/gizmo/gizmo-config-override.d.ts +24 -0
  88. package/dist/core/gizmo/gizmo-registry.d.ts +39 -0
  89. package/dist/core/gizmo/index.d.ts +19 -0
  90. package/dist/core/gizmo/register-gizmo-command-bindings.d.ts +20 -0
  91. package/dist/core/gizmo/state-gizmo-controller.d.ts +20 -0
  92. package/dist/core/history/history-manager.d.ts +174 -0
  93. package/dist/core/history/index.d.ts +1 -0
  94. package/dist/core/index.d.ts +25 -0
  95. package/dist/core/item/base-item.d.ts +154 -0
  96. package/dist/core/item/card-item.d.ts +91 -0
  97. package/dist/core/item/default-item-schema.d.ts +20 -0
  98. package/dist/core/item/effects-item.d.ts +99 -0
  99. package/dist/core/item/frame-item.d.ts +153 -0
  100. package/dist/core/item/generator-item.d.ts +114 -0
  101. package/dist/core/item/group-item.d.ts +51 -0
  102. package/dist/core/item/index.d.ts +25 -0
  103. package/dist/core/item/sprite-item.d.ts +80 -0
  104. package/dist/core/item/text-item.d.ts +171 -0
  105. package/dist/core/item/types.d.ts +158 -0
  106. package/dist/core/item/video-item.d.ts +120 -0
  107. package/dist/core/keybinding/index.d.ts +11 -0
  108. package/dist/core/keybinding/key-binding-controller.d.ts +44 -0
  109. package/dist/core/keybinding/key-binding-registry.d.ts +92 -0
  110. package/dist/core/keybinding/key-binding-store.d.ts +29 -0
  111. package/dist/core/keybinding/key-matcher.d.ts +24 -0
  112. package/dist/core/keybinding/types.d.ts +84 -0
  113. package/dist/core/plugin/index.d.ts +3 -0
  114. package/dist/core/plugin/io-plugin.d.ts +167 -0
  115. package/dist/core/plugin/plugin-system.d.ts +77 -0
  116. package/dist/core/predict/align-predict.d.ts +20 -0
  117. package/dist/core/predict/base/box-ops.d.ts +40 -0
  118. package/dist/core/predict/base/index.d.ts +14 -0
  119. package/dist/core/predict/base/parent-coord.d.ts +29 -0
  120. package/dist/core/predict/base/schema-box.d.ts +21 -0
  121. package/dist/core/predict/distribute-predict.d.ts +19 -0
  122. package/dist/core/predict/frame-layout-predict.d.ts +24 -0
  123. package/dist/core/predict/index.d.ts +12 -0
  124. package/dist/core/preferences/index.d.ts +2 -0
  125. package/dist/core/preferences/user-preferences-manager.d.ts +130 -0
  126. package/dist/core/quality/error-monitor/error-monitor-facade.d.ts +73 -0
  127. package/dist/core/quality/error-monitor/error-monitor.d.ts +106 -0
  128. package/dist/core/quality/error-monitor/index.d.ts +4 -0
  129. package/dist/core/quality/error-monitor/types.d.ts +198 -0
  130. package/dist/core/quality/index.d.ts +3 -0
  131. package/dist/core/quality/perf-monitor/index.d.ts +5 -0
  132. package/dist/core/quality/perf-monitor/perf-monitor-facade.d.ts +45 -0
  133. package/dist/core/quality/perf-monitor/perf-monitor.d.ts +60 -0
  134. package/dist/core/quality/perf-monitor/types.d.ts +66 -0
  135. package/dist/core/quality/stability-monitor/index.d.ts +5 -0
  136. package/dist/core/quality/stability-monitor/stability-monitor-facade.d.ts +50 -0
  137. package/dist/core/quality/stability-monitor/stability-monitor.d.ts +61 -0
  138. package/dist/core/quality/stability-monitor/types.d.ts +69 -0
  139. package/dist/core/renderer/background-controller.d.ts +56 -0
  140. package/dist/core/renderer/index.d.ts +5 -0
  141. package/dist/core/renderer/player-adapter.d.ts +129 -0
  142. package/dist/core/renderer/renderer.d.ts +134 -0
  143. package/dist/core/service/frame-service.d.ts +116 -0
  144. package/dist/core/service/index.d.ts +9 -0
  145. package/dist/core/service/interaction-providers.d.ts +20 -0
  146. package/dist/core/service/interaction-service.d.ts +211 -0
  147. package/dist/core/service/item-asset-service.d.ts +120 -0
  148. package/dist/core/service/item-creator-service.d.ts +211 -0
  149. package/dist/core/service/item-service.d.ts +641 -0
  150. package/dist/core/service/item-sync-service.d.ts +66 -0
  151. package/dist/core/service/json-scene-sync-service.d.ts +140 -0
  152. package/dist/core/service/refresh-animation-base-service.d.ts +1 -0
  153. package/dist/core/service/scene-data-assembler.d.ts +166 -0
  154. package/dist/core/service/view-service.d.ts +202 -0
  155. package/dist/core/state/base-state.d.ts +28 -0
  156. package/dist/core/state/index.d.ts +6 -0
  157. package/dist/core/state/presets.d.ts +25 -0
  158. package/dist/core/state/state-manager.d.ts +50 -0
  159. package/dist/core/state/types.d.ts +52 -0
  160. package/dist/core/store/index.d.ts +3 -0
  161. package/dist/core/store/scene-store.d.ts +194 -0
  162. package/dist/core/store/store.d.ts +36 -0
  163. package/dist/core/types/artis-config.d.ts +186 -0
  164. package/dist/core/types/artis-events.d.ts +101 -0
  165. package/dist/core/types/frame.d.ts +3 -0
  166. package/dist/core/types/generator.d.ts +28 -0
  167. package/dist/core/types/index.d.ts +15 -0
  168. package/dist/core/types/item-create-info.d.ts +205 -0
  169. package/dist/core/types/item-property.d.ts +149 -0
  170. package/dist/core/types/item-reorder.d.ts +12 -0
  171. package/dist/core/types/item-schema.d.ts +263 -0
  172. package/dist/core/types/item-set-property.d.ts +48 -0
  173. package/dist/core/types/page.d.ts +40 -0
  174. package/dist/core/types/sdk.d.ts +28 -0
  175. package/dist/core/types/view.d.ts +39 -0
  176. package/dist/helper/exporter/config.d.ts +18 -0
  177. package/dist/helper/exporter/const.d.ts +71 -0
  178. package/dist/helper/exporter/export-media.d.ts +189 -0
  179. package/dist/helper/exporter/exporter.d.ts +58 -0
  180. package/dist/helper/exporter/index.d.ts +2 -0
  181. package/dist/helper/exporter/types.d.ts +194 -0
  182. package/dist/helper/exporter/utils.d.ts +71 -0
  183. package/dist/helper/exporter/wav-audio.d.ts +35 -0
  184. package/dist/helper/html-overlay/anchor-navigation-runtime.d.ts +1 -0
  185. package/dist/helper/html-overlay/auto-height-layout.d.ts +16 -0
  186. package/dist/helper/html-overlay/auto-height-runtime.d.ts +40 -0
  187. package/dist/helper/html-overlay/document-runtime.d.ts +18 -0
  188. package/dist/helper/html-overlay/document-transform.d.ts +46 -0
  189. package/dist/helper/html-overlay/dom-order.d.ts +5 -0
  190. package/dist/helper/html-overlay/host-message-runtime.d.ts +15 -0
  191. package/dist/helper/html-overlay/html-capture-runtime.d.ts +12 -0
  192. package/dist/helper/html-overlay/html-card-service.d.ts +287 -0
  193. package/dist/helper/html-overlay/html-viewport-style.d.ts +6 -0
  194. package/dist/helper/html-overlay/index.d.ts +1 -0
  195. package/dist/helper/html-overlay/inline-script-json.d.ts +1 -0
  196. package/dist/helper/html-overlay/mime-utils.d.ts +13 -0
  197. package/dist/helper/html-overlay/overlay-transform.d.ts +30 -0
  198. package/dist/helper/html-overlay/path-utils.d.ts +34 -0
  199. package/dist/helper/html-overlay/runtime-context.d.ts +2 -0
  200. package/dist/helper/html-overlay/shell-runtime.d.ts +13 -0
  201. package/dist/helper/index.d.ts +5 -0
  202. package/dist/helper/scene-builder.d.ts +111 -0
  203. package/dist/helper/screen-shot.d.ts +51 -0
  204. package/dist/helper/size-adapt.d.ts +88 -0
  205. package/dist/index.cjs +69350 -0
  206. package/dist/index.cjs.map +1 -0
  207. package/dist/index.d.ts +19 -0
  208. package/dist/index.mjs +68963 -0
  209. package/dist/index.mjs.map +1 -0
  210. package/dist/shared/index.d.ts +1 -0
  211. package/dist/shared/player.d.ts +9 -0
  212. package/dist/utils/background-manager.d.ts +76 -0
  213. package/dist/utils/common-utils.d.ts +39 -0
  214. package/dist/utils/container-size.d.ts +7 -0
  215. package/dist/utils/find-player-item.d.ts +9 -0
  216. package/dist/utils/index.d.ts +11 -0
  217. package/dist/utils/json-data-utils.d.ts +198 -0
  218. package/dist/utils/layout-utils.d.ts +144 -0
  219. package/dist/utils/pixel-box-utils.d.ts +26 -0
  220. package/dist/utils/player-data-utils.d.ts +9 -0
  221. package/dist/utils/player-utils.d.ts +42 -0
  222. package/dist/utils/replay-utils.d.ts +22 -0
  223. package/dist/utils/types.d.ts +130 -0
  224. package/package.json +66 -0
@@ -0,0 +1,130 @@
1
+ import type { Matrix4, Vector2, Vector3 } from '@vvfx/gizmo';
2
+ import { spec } from '@galacean/effects';
3
+ /**
4
+ * 交互状态视图信息
5
+ */
6
+ export type ViewInteractionParam = {
7
+ /**
8
+ * 视口宽度 - 红框区域像素大小
9
+ */
10
+ width: number;
11
+ /**
12
+ * 视口高度 - 红框区域像素大小
13
+ */
14
+ height: number;
15
+ /**
16
+ * 视口缩放比例(用户 zoom)
17
+ */
18
+ scale: number;
19
+ /**
20
+ * 容器缩放 视口比例 补偿比(补偿 resize 时 aspect 变化对元素大小的影响)
21
+ */
22
+ contentRatio: number;
23
+ /**
24
+ * 容器缩放 宽 补偿比(补偿 resize 时 width 变化对元素大小的影响)
25
+ */
26
+ widthRatio: number;
27
+ /**
28
+ * 容器缩放 宽 补偿比(补偿 resize 时 height 变化对元素大小的影响)
29
+ */
30
+ heightRatio: number;
31
+ /**
32
+ * 视图像素与真实像素比例
33
+ */
34
+ pixelRatio: number;
35
+ /**
36
+ * 视口位移信息
37
+ */
38
+ translation: Vector2;
39
+ /**
40
+ * 标尺宽度
41
+ */
42
+ rulerWidth: number;
43
+ };
44
+ /**
45
+ * 交互状态相机信息
46
+ */
47
+ export type CameraInteractionParam = {
48
+ /**
49
+ * 位置
50
+ */
51
+ position: Vector3;
52
+ /**
53
+ * 旋转角度
54
+ */
55
+ rotation: Vector3;
56
+ /**
57
+ * 视野初始中心
58
+ */
59
+ focusPosition: Vector3;
60
+ /**
61
+ * 视野初始角度
62
+ */
63
+ focusRotation: Vector3;
64
+ /**
65
+ * 投影矩阵
66
+ */
67
+ viewProjectionMatrix: Matrix4;
68
+ /**
69
+ * 逆投影矩阵
70
+ */
71
+ inverseViewProjectionMatrix: Matrix4;
72
+ };
73
+ export declare const SafeConstraint: {
74
+ topAdsorption: string;
75
+ leftAdsorption: string;
76
+ rightAdsorption: string;
77
+ bottomAdsorption: string;
78
+ centerAdsorption: string;
79
+ bottomCenterAdsorption: string;
80
+ };
81
+ export type ItemJSONInfo = {
82
+ item: spec.VFXItemData;
83
+ components: spec.ComponentData[];
84
+ tracks: any[];
85
+ playableAssets: any[];
86
+ };
87
+ export type AlignType = 'left' | 'right' | 'horizontal-center' | 'top' | 'bottom' | 'vertical-center';
88
+ export type DistributeType = 'vertical-spacing' | 'horizontal-spacing';
89
+ /**
90
+ * 背景类型预设配置
91
+ */
92
+ export type BackgroundPreset = {
93
+ /**
94
+ * 背景颜色
95
+ */
96
+ color?: string;
97
+ /**
98
+ * 背景图片/渐变
99
+ */
100
+ image?: string;
101
+ /**
102
+ * 背景重复方式
103
+ */
104
+ repeat?: string;
105
+ /**
106
+ * 背景位置
107
+ */
108
+ position?: string;
109
+ /**
110
+ * 背景大小
111
+ */
112
+ size?: string;
113
+ };
114
+ /**
115
+ * 背景网格配置
116
+ */
117
+ export type BackgroundGridConfig = {
118
+ /**
119
+ * 基础网格大小(像素)
120
+ */
121
+ baseSize: number;
122
+ /**
123
+ * 缩放循环阈值(默认 2,即 2x 时重置)
124
+ */
125
+ zoomCycle: number;
126
+ /**
127
+ * 最小网格大小限制
128
+ */
129
+ minSize: number;
130
+ };
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@vvfx/artis",
3
+ "description": "智能画布",
4
+ "version": "0.0.1-alpha.0",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.mjs",
15
+ "require": "./dist/index.cjs"
16
+ }
17
+ },
18
+ "dependencies": {
19
+ "@ffmpeg/ffmpeg": "0.12.15",
20
+ "@ffmpeg/util": "0.12.2",
21
+ "@galacean/effects": "2.10.0-alpha.4",
22
+ "@galacean/effects-plugin-ffd": "2.10.0-alpha.4",
23
+ "@galacean/effects-plugin-model": "2.10.0-alpha.4",
24
+ "@galacean/effects-plugin-multimedia": "2.10.0-alpha.4",
25
+ "@galacean/effects-plugin-rich-text": "2.10.0-alpha.4",
26
+ "@galacean/effects-plugin-spine": "2.10.0-alpha.4",
27
+ "@progress/jszip-esm": "^1.0.4",
28
+ "@vvfx/gizmo": "0.0.1-alpha.0",
29
+ "@zumer/snapdom": "^2.12.0"
30
+ },
31
+ "contributors": [
32
+ {
33
+ "name": "赤芍"
34
+ },
35
+ {
36
+ "name": "何即"
37
+ },
38
+ {
39
+ "name": "不择"
40
+ },
41
+ {
42
+ "name": "意绮"
43
+ }
44
+ ],
45
+ "author": "Ant Group CO., Ltd.",
46
+ "license": "MIT",
47
+ "publishConfig": {
48
+ "access": "public",
49
+ "registry": "https://registry.npmjs.org"
50
+ },
51
+ "devDependencies": {
52
+ "jsdom": "^29.1.1"
53
+ },
54
+ "scripts": {
55
+ "prebuild": "pnpm clean",
56
+ "build": "pnpm build:declaration && pnpm build:module",
57
+ "build:module": "rollup -c --bundleConfigAsCjs",
58
+ "build:declaration": "tsc -p tsconfig.external.json",
59
+ "clean": "rimraf --glob dist *.tsbuildinfo",
60
+ "test": "vitest run",
61
+ "test:release": "vitest run --config vitest.release.config.ts",
62
+ "test:ui": "node tests/ui/test-server.mjs",
63
+ "verify:gizmo-package": "node scripts/verify-gizmo-package.mjs",
64
+ "verify:publish": "pnpm verify:gizmo-package && pnpm test && pnpm test:release && pnpm build"
65
+ }
66
+ }