@galacean/effects-specification 2.1.0-beta.0 → 2.1.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 (96) hide show
  1. package/es/animation-clip-data.d.ts +1 -1
  2. package/es/assets.d.ts +95 -0
  3. package/es/assets.js +18 -0
  4. package/es/binary.d.ts +2 -1
  5. package/es/buitin-object-guid.d.ts +1 -0
  6. package/es/buitin-object-guid.js +1 -0
  7. package/es/components/component-data.d.ts +7 -0
  8. package/es/components/component-data.js +1 -0
  9. package/es/components/index.d.ts +2 -0
  10. package/es/components/index.js +2 -0
  11. package/es/components/post-process-volume-data.d.ts +38 -0
  12. package/es/components/post-process-volume-data.js +1 -0
  13. package/es/composition.d.ts +0 -4
  14. package/es/curve-data/color-curve-data.d.ts +7 -0
  15. package/es/curve-data/color-curve-data.js +1 -0
  16. package/es/curve-data/index.d.ts +2 -0
  17. package/es/curve-data/index.js +2 -0
  18. package/es/curve-data/vector4-curve-data.d.ts +7 -0
  19. package/es/curve-data/vector4-curve-data.js +1 -0
  20. package/es/data-type.d.ts +47 -0
  21. package/es/data-type.js +50 -0
  22. package/es/effects-object-data.d.ts +6 -0
  23. package/es/effects-object-data.js +1 -0
  24. package/es/effects-package-data.d.ts +9 -0
  25. package/es/effects-package-data.js +1 -0
  26. package/es/{components.d.ts → geometry-data.d.ts} +1 -95
  27. package/es/{components.js → geometry-data.js} +0 -39
  28. package/es/index.d.ts +15 -2
  29. package/es/index.js +15 -2
  30. package/es/item/audio-item.d.ts +46 -0
  31. package/es/item/audio-item.js +1 -0
  32. package/es/item/base-item.d.ts +3 -10
  33. package/es/item/effect-item.d.ts +6 -0
  34. package/es/item/interact-item.d.ts +1 -5
  35. package/es/item/model/light.d.ts +6 -1
  36. package/es/item/model/render.d.ts +5 -1
  37. package/es/item/model/render.js +4 -0
  38. package/es/item/model/skybox.d.ts +4 -11
  39. package/es/item/model/tree.d.ts +12 -12
  40. package/es/item/particle-item.d.ts +3 -68
  41. package/es/item/particle-shape.d.ts +12 -12
  42. package/es/item/rich-text-item.d.ts +35 -0
  43. package/es/item/rich-text-item.js +1 -0
  44. package/es/item/spine-item.d.ts +7 -2
  45. package/es/item/sprite-item.d.ts +1 -43
  46. package/es/item/text-item.d.ts +35 -64
  47. package/es/item/video-item.d.ts +82 -0
  48. package/es/item/video-item.js +1 -0
  49. package/es/item.d.ts +4 -1
  50. package/es/material-data.d.ts +21 -0
  51. package/es/material-data.js +1 -0
  52. package/es/math/color-data.d.ts +6 -0
  53. package/es/math/color-data.js +1 -0
  54. package/es/math/index.d.ts +2 -0
  55. package/es/math/index.js +2 -0
  56. package/es/math/vector-data.d.ts +15 -0
  57. package/es/math/vector-data.js +1 -0
  58. package/es/number-expression.d.ts +18 -1
  59. package/es/number-expression.js +8 -0
  60. package/es/render-settings.d.ts +4 -0
  61. package/es/render-settings.js +1 -0
  62. package/es/scene.d.ts +28 -7
  63. package/es/shader-data.d.ts +6 -0
  64. package/es/shader-data.js +1 -0
  65. package/es/shape/custom-shape-data.d.ts +73 -0
  66. package/es/shape/custom-shape-data.js +1 -0
  67. package/es/shape/ellipse-data.d.ts +33 -0
  68. package/es/shape/ellipse-data.js +1 -0
  69. package/es/shape/index.d.ts +9 -0
  70. package/es/shape/index.js +9 -0
  71. package/es/shape/polygon-data.d.ts +33 -0
  72. package/es/shape/polygon-data.js +1 -0
  73. package/es/shape/rectangle-data.d.ts +33 -0
  74. package/es/shape/rectangle-data.js +1 -0
  75. package/es/shape/shape-component-data.d.ts +11 -0
  76. package/es/shape/shape-component-data.js +1 -0
  77. package/es/shape/shape-fill-param.d.ts +10 -0
  78. package/es/shape/shape-fill-param.js +1 -0
  79. package/es/shape/shape-primitive-type.d.ts +25 -0
  80. package/es/shape/shape-primitive-type.js +26 -0
  81. package/es/shape/shape-stroke-param.d.ts +26 -0
  82. package/es/shape/shape-stroke-param.js +8 -0
  83. package/es/shape/star-data.d.ts +41 -0
  84. package/es/shape/star-data.js +1 -0
  85. package/es/texture.d.ts +48 -0
  86. package/es/texture.js +1 -0
  87. package/es/timeline/playables/sprite-color-playable-asset-data.d.ts +2 -1
  88. package/es/timeline/playables/transform-playable-asset-data.d.ts +2 -1
  89. package/es/timeline/timeline-asset-data.d.ts +3 -1
  90. package/es/timeline/track/track-asset-data.d.ts +2 -1
  91. package/es/type.d.ts +25 -16
  92. package/es/type.js +33 -13
  93. package/es/vfx-item-data.d.ts +2 -1
  94. package/package.json +4 -5
  95. package/es/image.d.ts +0 -123
  96. package/es/image.js +0 -9
@@ -0,0 +1,82 @@
1
+ import type { ComponentData, DataPath } from '../components';
2
+ import type { RGBAColorValue } from '../number-expression';
3
+ import type { SizeOverLifetime, RotationOverLifetime, PositionOverLifetime, ColorOverLifetime, InteractBehavior, RendererOptions, ItemType } from '../type';
4
+ import type { BaseItem, EndBehavior } from './base-item';
5
+ /**
6
+ * 视频元素
7
+ */
8
+ export interface VideoItem extends BaseItem {
9
+ /**
10
+ * 元素类型(指定为 video)
11
+ */
12
+ type: ItemType.video;
13
+ /**
14
+ * 视频元素渲染信息
15
+ */
16
+ content: VideoComponentData;
17
+ endBehavior: EndBehavior;
18
+ }
19
+ export interface VideoContentOptions {
20
+ /**
21
+ * 元素基础颜色
22
+ * @default [255,255,255,255]
23
+ */
24
+ startColor?: RGBAColorValue;
25
+ /**
26
+ * 视频链接,索引到 scene 中的 videos 数组
27
+ */
28
+ video: DataPath;
29
+ /**
30
+ * 视频播放速度
31
+ * @default 1
32
+ */
33
+ playbackRate?: number;
34
+ /**
35
+ * 是否静音播放
36
+ * @default false
37
+ */
38
+ muted?: boolean;
39
+ /**
40
+ * 视频音量大小
41
+ * @default 1
42
+ */
43
+ volume?: number;
44
+ }
45
+ /**
46
+ * 视频组件属性
47
+ */
48
+ export interface VideoComponentData extends ComponentData {
49
+ /**
50
+ * 视频元素基础属性
51
+ */
52
+ options: VideoContentOptions;
53
+ /**
54
+ * 视频元素材质渲染属性
55
+ */
56
+ renderer: RendererOptions;
57
+ /**
58
+ * 视频元素大小变化属性
59
+ */
60
+ sizeOverLifetime?: SizeOverLifetime;
61
+ /**
62
+ * 视频元素旋转变化属性
63
+ */
64
+ rotationOverLifetime?: RotationOverLifetime;
65
+ /**
66
+ * 视频元素位置变化属性
67
+ */
68
+ positionOverLifetime?: PositionOverLifetime;
69
+ /**
70
+ * 视频元素色彩变化属性
71
+ */
72
+ colorOverLifetime?: ColorOverLifetime;
73
+ /**
74
+ * 视频元素交互
75
+ */
76
+ interaction?: {
77
+ /**
78
+ * 交互行为
79
+ */
80
+ behavior: InteractBehavior;
81
+ };
82
+ }
@@ -0,0 +1 @@
1
+ export {};
package/es/item.d.ts CHANGED
@@ -8,7 +8,10 @@ import type { ModelCameraItem, ModelLightItem, ModelMeshItem, ModelSkyboxItem, M
8
8
  import type { CameraItem } from './item/camera-item';
9
9
  import type { CompositionItem } from './item/composition-item';
10
10
  import type { TextItem } from './item/text-item';
11
+ import type { VideoItem } from './item/video-item';
12
+ import type { AudioItem } from './item/audio-item';
13
+ import type { RichTextItem } from './item/rich-text-item';
11
14
  /**
12
15
  * Item 基类,无对应元素
13
16
  */
14
- export type Item = SpriteItem | ParticleItem | NullItem | PluginItem | InteractItem | CameraItem | TextItem | ModelMeshItem<'json'> | ModelSkyboxItem<'json'> | ModelTreeItem<'json'> | ModelLightItem | ModelCameraItem | SpineItem | CompositionItem | ModelMeshItem<'studio'> | ModelSkyboxItem<'studio'> | ModelTreeItem<'studio'>;
17
+ export type Item = SpriteItem | ParticleItem | NullItem | PluginItem | InteractItem | CameraItem | TextItem | RichTextItem | VideoItem | AudioItem | ModelMeshItem<'json'> | ModelSkyboxItem<'json'> | ModelTreeItem<'json'> | ModelLightItem | ModelCameraItem | SpineItem | CompositionItem | ModelMeshItem<'studio'> | ModelSkyboxItem<'studio'> | ModelTreeItem<'studio'>;
@@ -0,0 +1,21 @@
1
+ import type { DataPath } from './components';
2
+ import type { EffectsObjectData } from './effects-object-data';
3
+ import type { Vector4Data, ColorData, Vector2Data } from './math';
4
+ export interface MaterialTextureProperty {
5
+ texture: DataPath;
6
+ offset?: Vector2Data;
7
+ scale?: Vector2Data;
8
+ }
9
+ export interface MaterialData extends EffectsObjectData {
10
+ shader: DataPath;
11
+ blending?: boolean;
12
+ zWrite?: boolean;
13
+ zTest?: boolean;
14
+ stringTags: Record<string, string>;
15
+ macros: string[];
16
+ ints: Record<string, number>;
17
+ floats: Record<string, number>;
18
+ vector4s: Record<string, Vector4Data>;
19
+ colors: Record<string, ColorData>;
20
+ textures: Record<string, MaterialTextureProperty>;
21
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ export interface ColorData {
2
+ r: number;
3
+ g: number;
4
+ b: number;
5
+ a: number;
6
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './color-data';
2
+ export * from './vector-data';
@@ -0,0 +1,2 @@
1
+ export * from './color-data';
2
+ export * from './vector-data';
@@ -0,0 +1,15 @@
1
+ export interface Vector4Data {
2
+ x: number;
3
+ y: number;
4
+ z: number;
5
+ w: number;
6
+ }
7
+ export interface Vector3Data {
8
+ x: number;
9
+ y: number;
10
+ z: number;
11
+ }
12
+ export interface Vector2Data {
13
+ x: number;
14
+ y: number;
15
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,4 @@
1
+ import type { ColorCurveData, Vector4CurveData } from './curve-data';
1
2
  /*********************************************/
2
3
  /*********************************************/
3
4
  export declare enum ValueType {
@@ -72,7 +73,15 @@ export declare enum ValueType {
72
73
  /**
73
74
  * 贝塞尔曲线四元数
74
75
  */
75
- BEZIER_CURVE_QUAT = 23
76
+ BEZIER_CURVE_QUAT = 23,
77
+ /**
78
+ * 颜色曲线
79
+ */
80
+ COLOR_CURVE = 24,
81
+ /**
82
+ * Vector4 曲线
83
+ */
84
+ VECTOR4_CURVE = 25
76
85
  }
77
86
  export type vec2 = [x: number, y: number];
78
87
  export type vec3 = [x: number, y: number, z: number];
@@ -263,6 +272,14 @@ export type BezierCurvePath = [type: ValueType.BEZIER_CURVE_PATH, value: BezierC
263
272
  * 贝塞尔曲线路径关键帧
264
273
  */
265
274
  export type BezierCurveQuat = [type: ValueType.BEZIER_CURVE_QUAT, value: BezierCurveQuatValue];
275
+ /**
276
+ * 颜色贝塞尔曲线
277
+ */
278
+ export type ColorCurveValue = [type: ValueType.COLOR_CURVE, value: ColorCurveData];
279
+ /**
280
+ * Vector4 贝塞尔曲线
281
+ */
282
+ export type Vector4CurveValue = [type: ValueType.VECTOR4_CURVE, value: Vector4CurveData];
266
283
  /*********************************************/
267
284
  /*********************************************/
268
285
  export type ColorExpression = RGBAColor | GradientColor | RGBAColors;
@@ -75,6 +75,14 @@ export var ValueType;
75
75
  * 贝塞尔曲线四元数
76
76
  */
77
77
  ValueType[ValueType["BEZIER_CURVE_QUAT"] = 23] = "BEZIER_CURVE_QUAT";
78
+ /**
79
+ * 颜色曲线
80
+ */
81
+ ValueType[ValueType["COLOR_CURVE"] = 24] = "COLOR_CURVE";
82
+ /**
83
+ * Vector4 曲线
84
+ */
85
+ ValueType[ValueType["VECTOR4_CURVE"] = 25] = "VECTOR4_CURVE";
78
86
  })(ValueType || (ValueType = {}));
79
87
  /**
80
88
  * 关键帧类型
@@ -0,0 +1,4 @@
1
+ export interface RenderSettings {
2
+ postProcessingEnabled: boolean;
3
+ supportsHDR: boolean;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
package/es/scene.d.ts CHANGED
@@ -1,12 +1,18 @@
1
1
  import type { Composition, CompositionData } from './composition';
2
2
  import type { SpineResource } from './item/spine-item';
3
- import type { PlayerVersion, Shape } from './type';
4
- import type { TemplateImage, Image, CompressedImage, TextureDefine } from './image';
3
+ import type { PlayerVersion, ShapeGeometry } from './type';
4
+ import type { TextureDefine } from './texture';
5
5
  import type { FontBase, FontDefine } from './text';
6
6
  import type { BinaryFile } from './binary';
7
- import type { ComponentData, EffectsObjectData, GeometryData, MaterialData, ShaderData } from './components';
7
+ import type { ComponentData } from './components';
8
8
  import type { VFXItemData } from './vfx-item-data';
9
9
  import type { AnimationClipData } from './animation-clip-data';
10
+ import type { AssetBase, ImageSource } from './assets';
11
+ import type { RenderSettings } from './render-settings';
12
+ import type { EffectsObjectData } from './effects-object-data';
13
+ import type { MaterialData } from './material-data';
14
+ import type { GeometryData } from './geometry-data';
15
+ import type { ShaderData } from './shader-data';
10
16
  /**
11
17
  * runtime 2.0 之前的场景信息
12
18
  * 素材信息存放于统一数据结构中
@@ -50,7 +56,7 @@ export interface JSONSceneLegacy {
50
56
  /**
51
57
  * 贴图信息
52
58
  */
53
- images: (TemplateImage | Image | CompressedImage)[];
59
+ images: ImageSource[];
54
60
  /**
55
61
  * 根据合成ID,每个合成用到的 image 的数组索引
56
62
  */
@@ -62,7 +68,7 @@ export interface JSONSceneLegacy {
62
68
  /**
63
69
  * 蒙版形状信息
64
70
  */
65
- shapes: Shape[];
71
+ shapes: ShapeGeometry[];
66
72
  /**
67
73
  * 插件类型信息
68
74
  * 'model@1.0'
@@ -107,6 +113,7 @@ export interface JSONScene {
107
113
  * JSON 版本
108
114
  *
109
115
  * 3.0 EC 改造、移除滤镜元素
116
+ * 3.1 音视频
110
117
  */
111
118
  version: string;
112
119
  /**
@@ -127,11 +134,15 @@ export interface JSONScene {
127
134
  * 渲染所需合成列表
128
135
  */
129
136
  compositions: CompositionData[];
137
+ /**
138
+ * 渲染配置
139
+ */
140
+ renderSettings?: RenderSettings;
130
141
  /******************************** 以下皆为可复用信息,加载在对应 Manager 中 *******************************/
131
142
  /**
132
143
  * 贴图信息
133
144
  */
134
- images: (TemplateImage | Image | CompressedImage)[];
145
+ images: ImageSource[];
135
146
  /**
136
147
  * 根据合成 ID,每个合成用到的 image 的数组索引
137
148
  */
@@ -143,7 +154,7 @@ export interface JSONScene {
143
154
  /**
144
155
  * 蒙版形状信息
145
156
  */
146
- shapes: Shape[];
157
+ shapes: ShapeGeometry[];
147
158
  /**
148
159
  * 插件类型信息
149
160
  * 'model@1.0'
@@ -154,6 +165,16 @@ export interface JSONScene {
154
165
  * 数据模板下掉可以不要 FontBase[]
155
166
  */
156
167
  fonts?: FontBase[] | FontDefine[];
168
+ /**
169
+ * 视频资源
170
+ * @since 2.0.0
171
+ */
172
+ videos?: AssetBase[];
173
+ /**
174
+ * 音频资源
175
+ * @since 2.0.0
176
+ */
177
+ audios?: AssetBase[];
157
178
  /**
158
179
  * 二进制文件地址
159
180
  */
@@ -0,0 +1,6 @@
1
+ import type { EffectsObjectData } from './effects-object-data';
2
+ export interface ShaderData extends EffectsObjectData {
3
+ vertex: string;
4
+ fragment: string;
5
+ properties?: string;
6
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,73 @@
1
+ import type { TransformData } from '../item/base-item';
2
+ import type { Vector2Data } from '../math';
3
+ import type { ShapeComponentData } from './shape-component-data';
4
+ import type { ShapeFillParam } from './shape-fill-param';
5
+ import type { ShapePrimitiveType } from './shape-primitive-type';
6
+ import type { ShapeStrokeParam } from './shape-stroke-param';
7
+ /**
8
+ * 自定义形状点
9
+ */
10
+ export interface CustomShapePoint {
11
+ /**
12
+ * 顶点索引
13
+ */
14
+ point: number;
15
+ /**
16
+ * 入射点索引
17
+ */
18
+ easingIn: number;
19
+ /**
20
+ * 出射点索引
21
+ */
22
+ easingOut: number;
23
+ }
24
+ /**
25
+ * 自定义形状参数
26
+ */
27
+ export interface CustomShape {
28
+ /**
29
+ * 点索引 - 用于构成闭合图形
30
+ */
31
+ indexes: CustomShapePoint[];
32
+ /**
33
+ * 是否为闭合图形 - 用于Stroke
34
+ */
35
+ close: boolean;
36
+ /**
37
+ * 填充属性
38
+ */
39
+ fill?: ShapeFillParam;
40
+ /**
41
+ * 描边属性
42
+ */
43
+ stroke?: ShapeStrokeParam;
44
+ /**
45
+ * 空间变换
46
+ */
47
+ transform?: TransformData;
48
+ }
49
+ /**
50
+ * 自定义图形组件
51
+ */
52
+ export interface CustomShapeData extends ShapeComponentData {
53
+ /**
54
+ * 矢量类型 - 形状
55
+ */
56
+ type: ShapePrimitiveType.Custom;
57
+ /**
58
+ * 路径点
59
+ */
60
+ points: Vector2Data[];
61
+ /**
62
+ * 入射控制点
63
+ */
64
+ easingIns: Vector2Data[];
65
+ /**
66
+ * 入射控制点
67
+ */
68
+ easingOuts: Vector2Data[];
69
+ /**
70
+ * 自定义形状
71
+ */
72
+ shapes: CustomShape[];
73
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,33 @@
1
+ import type { TransformData } from '../item/base-item';
2
+ import type { ShapeComponentData } from './shape-component-data';
3
+ import type { ShapeFillParam } from './shape-fill-param';
4
+ import type { ShapePrimitiveType } from './shape-primitive-type';
5
+ import type { ShapeStrokeParam } from './shape-stroke-param';
6
+ /**
7
+ * 椭圆组件参数
8
+ */
9
+ export interface EllipseData extends ShapeComponentData {
10
+ type: ShapePrimitiveType.Ellipse;
11
+ /**
12
+ * x 轴半径
13
+ * -- TODO 后续完善类型
14
+ * -- TODO 可以看一下用xRadius/yRadius 还是 width/height
15
+ */
16
+ xRadius: number;
17
+ /**
18
+ * y 轴半径
19
+ */
20
+ yRadius: number;
21
+ /**
22
+ * 填充属性
23
+ */
24
+ fill?: ShapeFillParam;
25
+ /**
26
+ * 描边属性
27
+ */
28
+ stroke?: ShapeStrokeParam;
29
+ /**
30
+ * 空间变换
31
+ */
32
+ transform?: TransformData;
33
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ export * from './custom-shape-data';
2
+ export * from './ellipse-data';
3
+ export * from './polygon-data';
4
+ export * from './rectangle-data';
5
+ export * from './shape-component-data';
6
+ export * from './shape-fill-param';
7
+ export * from './shape-primitive-type';
8
+ export * from './shape-stroke-param';
9
+ export * from './star-data';
@@ -0,0 +1,9 @@
1
+ export * from './custom-shape-data';
2
+ export * from './ellipse-data';
3
+ export * from './polygon-data';
4
+ export * from './rectangle-data';
5
+ export * from './shape-component-data';
6
+ export * from './shape-fill-param';
7
+ export * from './shape-primitive-type';
8
+ export * from './shape-stroke-param';
9
+ export * from './star-data';
@@ -0,0 +1,33 @@
1
+ import type { TransformData } from '../item/base-item';
2
+ import type { ShapeComponentData } from './shape-component-data';
3
+ import type { ShapeFillParam } from './shape-fill-param';
4
+ import type { ShapeStrokeParam } from './shape-stroke-param';
5
+ /**
6
+ * 多边形参数
7
+ */
8
+ export interface PolygonData extends ShapeComponentData {
9
+ /**
10
+ * 顶点数
11
+ */
12
+ pointCount: number;
13
+ /**
14
+ * 外切圆半径
15
+ */
16
+ radius: number;
17
+ /**
18
+ * 角点圆度
19
+ */
20
+ roundness: number;
21
+ /**
22
+ * 填充属性
23
+ */
24
+ fill?: ShapeFillParam;
25
+ /**
26
+ * 描边属性
27
+ */
28
+ stroke?: ShapeStrokeParam;
29
+ /**
30
+ * 空间变换
31
+ */
32
+ transform?: TransformData;
33
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,33 @@
1
+ import type { TransformData } from '../item/base-item';
2
+ import type { ShapeComponentData } from './shape-component-data';
3
+ import type { ShapeFillParam } from './shape-fill-param';
4
+ import type { ShapeStrokeParam } from './shape-stroke-param';
5
+ /**
6
+ * 矩形参数
7
+ */
8
+ export interface RectangleData extends ShapeComponentData {
9
+ /**
10
+ * 宽度
11
+ */
12
+ width: number;
13
+ /**
14
+ * 高度
15
+ */
16
+ height: number;
17
+ /**
18
+ * 角点元素
19
+ */
20
+ roundness: number;
21
+ /**
22
+ * 填充属性
23
+ */
24
+ fill?: ShapeFillParam;
25
+ /**
26
+ * 描边属性
27
+ */
28
+ stroke?: ShapeStrokeParam;
29
+ /**
30
+ * 空间变换
31
+ */
32
+ transform?: TransformData;
33
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { ComponentData } from '../components/component-data';
2
+ import type { ShapePrimitiveType } from './shape-primitive-type';
3
+ /**
4
+ * 矢量图形组件
5
+ */
6
+ export interface ShapeComponentData extends ComponentData {
7
+ /**
8
+ * 矢量类型
9
+ */
10
+ type: ShapePrimitiveType;
11
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { ColorData } from '../math/color-data';
2
+ /**
3
+ * 矢量填充参数
4
+ */
5
+ export interface ShapeFillParam {
6
+ /**
7
+ * 填充颜色
8
+ */
9
+ color: ColorData;
10
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ /**
2
+ * 矢量图形类型
3
+ */
4
+ export declare enum ShapePrimitiveType {
5
+ /**
6
+ * 自定义图形
7
+ */
8
+ Custom = 0,
9
+ /**
10
+ * 矩形
11
+ */
12
+ Rectangle = 1,
13
+ /**
14
+ * 椭圆
15
+ */
16
+ Ellipse = 2,
17
+ /**
18
+ * 多边形
19
+ */
20
+ Polygon = 3,
21
+ /**
22
+ * 星形
23
+ */
24
+ Star = 4
25
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * 矢量图形类型
3
+ */
4
+ export var ShapePrimitiveType;
5
+ (function (ShapePrimitiveType) {
6
+ /**
7
+ * 自定义图形
8
+ */
9
+ ShapePrimitiveType[ShapePrimitiveType["Custom"] = 0] = "Custom";
10
+ /**
11
+ * 矩形
12
+ */
13
+ ShapePrimitiveType[ShapePrimitiveType["Rectangle"] = 1] = "Rectangle";
14
+ /**
15
+ * 椭圆
16
+ */
17
+ ShapePrimitiveType[ShapePrimitiveType["Ellipse"] = 2] = "Ellipse";
18
+ /**
19
+ * 多边形
20
+ */
21
+ ShapePrimitiveType[ShapePrimitiveType["Polygon"] = 3] = "Polygon";
22
+ /**
23
+ * 星形
24
+ */
25
+ ShapePrimitiveType[ShapePrimitiveType["Star"] = 4] = "Star";
26
+ })(ShapePrimitiveType || (ShapePrimitiveType = {}));
@@ -0,0 +1,26 @@
1
+ import type { ColorData } from '../math/color-data';
2
+ export declare enum ShapeConnectType {
3
+ }
4
+ export declare enum ShapePointType {
5
+ }
6
+ /**
7
+ * 矢量描边参数
8
+ */
9
+ export interface ShapeStrokeParam {
10
+ /**
11
+ * 线宽
12
+ */
13
+ width: number;
14
+ /**
15
+ * 线颜色
16
+ */
17
+ color: ColorData;
18
+ /**
19
+ * 连接类型
20
+ */
21
+ connectType: ShapeConnectType;
22
+ /**
23
+ * 点类型
24
+ */
25
+ pointType: ShapePointType;
26
+ }
@@ -0,0 +1,8 @@
1
+ // 本期无该功能 待补充
2
+ export var ShapeConnectType;
3
+ (function (ShapeConnectType) {
4
+ })(ShapeConnectType || (ShapeConnectType = {}));
5
+ // @待补充
6
+ export var ShapePointType;
7
+ (function (ShapePointType) {
8
+ })(ShapePointType || (ShapePointType = {}));