@galacean/effects-specification 0.0.2 → 1.0.1
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/LICENSE +21 -0
- package/README.md +6 -12
- package/dist/fallback.js +10 -5
- package/dist/fallback.js.map +1 -1
- package/dist/fallback.mjs +10 -5
- package/dist/fallback.mjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/src/binary.d.ts +6 -6
- package/dist/src/image.d.ts +5 -5
- package/dist/src/item/base-item.d.ts +1 -1
- package/dist/src/item/filter-item.d.ts +1 -1
- package/dist/src/item/interact-item.d.ts +1 -1
- package/dist/src/item/model/binary.d.ts +5 -5
- package/dist/src/item/model/light.d.ts +1 -1
- package/dist/src/item/model/material.d.ts +1 -1
- package/dist/src/item/model/mesh.d.ts +2 -2
- package/dist/src/item/particle-shape.d.ts +1 -1
- package/dist/src/item/plugin-item.d.ts +1 -1
- package/dist/src/item/spine-item.d.ts +1 -1
- package/dist/src/item.d.ts +1 -1
- package/dist/src/numberExpression.d.ts +44 -44
- package/dist/src/scene.d.ts +1 -1
- package/dist/src/type.d.ts +1 -1
- package/package.json +5 -1
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
package/dist/src/binary.d.ts
CHANGED
|
@@ -17,9 +17,9 @@ import type { ValueType } from './numberExpression';
|
|
|
17
17
|
* baseTexture: ImageBitmap
|
|
18
18
|
* }
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
20
|
+
export type BinaryPointerContent = [index: number, start?: number, byteLength?: number, type?: BinaryType];
|
|
21
|
+
export type BinaryPointer = [ValueType.BINARY, BinaryPointerContent];
|
|
22
|
+
export type BinaryType = 'u8' | 'i8' | 'i16' | 'u16' | 'f32' | 'u32' | 'i32' | 'f64' | string;
|
|
23
23
|
/**
|
|
24
24
|
* 线上二进制地址
|
|
25
25
|
*/
|
|
@@ -27,7 +27,7 @@ export interface BinaryFile {
|
|
|
27
27
|
url: string;
|
|
28
28
|
renderLevel?: RenderLevel;
|
|
29
29
|
}
|
|
30
|
-
export
|
|
30
|
+
export type BinaryEnv = 'studio' | 'runtime' | 'json';
|
|
31
31
|
/**
|
|
32
32
|
* 类型模板,根据 runtime/studio/json 环境区别类型
|
|
33
33
|
* type TexturePointer<T extends BinaryEnv> = Binary<Texture, HTMLImage, T>;
|
|
@@ -35,7 +35,7 @@ export declare type BinaryEnv = 'studio' | 'runtime' | 'json';
|
|
|
35
35
|
* let studioTex: TexturePointer<'studio'> // type: Texture
|
|
36
36
|
* let jsonTex: TexturePointer<'json'> // binary pointer: [20,[0,0]]
|
|
37
37
|
*/
|
|
38
|
-
export
|
|
38
|
+
export type Binary<STUDIO, RUNTIME, ENV extends BinaryEnv> = ENV extends 'json' ? BinaryPointer : (ENV extends 'studio' ? STUDIO : RUNTIME);
|
|
39
39
|
/**
|
|
40
40
|
* 二进制合并
|
|
41
41
|
* 如果有多个二进制,在发布的时候可以合并二进制,并且替换掉,
|
|
@@ -57,4 +57,4 @@ export declare type Binary<STUDIO, RUNTIME, ENV extends BinaryEnv> = ENV extends
|
|
|
57
57
|
* bins: [{url:'https://url/3'}]
|
|
58
58
|
* }
|
|
59
59
|
*/
|
|
60
|
-
export
|
|
60
|
+
export type TypedArray = Float32Array | Float64Array | Uint8Array | Uint32Array | Uint16Array | Int8Array | Int16Array | Int32Array;
|
package/dist/src/image.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface TextureConfigOptionsBase {
|
|
|
17
17
|
premultiplyAlpha?: boolean;
|
|
18
18
|
keepImageSource?: boolean;
|
|
19
19
|
}
|
|
20
|
-
export
|
|
20
|
+
export type SerializedTextureCubeMipmap = [
|
|
21
21
|
TEXTURE_CUBE_MAP_POSITIVE_X: BinaryPointer,
|
|
22
22
|
TEXTURE_CUBE_MAP_NEGATIVE_X: BinaryPointer,
|
|
23
23
|
TEXTURE_CUBE_MAP_POSITIVE_Y: BinaryPointer,
|
|
@@ -37,10 +37,10 @@ export interface SerializedTextureCube extends TextureConfigOptionsBase, Texture
|
|
|
37
37
|
target: WebGLRenderingContext['TEXTURE_CUBE_MAP'];
|
|
38
38
|
mipmaps: SerializedTextureCubeMipmap[];
|
|
39
39
|
}
|
|
40
|
-
export
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
export
|
|
40
|
+
export type SerializedTexture2D = SerializedTexture2DImageSource | SerializedTexture2DMipmapSource;
|
|
41
|
+
export type SerializedTextureSource = SerializedTexture2D | SerializedTextureCube;
|
|
42
|
+
export type TextureJSONOptions = SerializedTextureSource;
|
|
43
|
+
export type TextureDefine = TextureJSONOptions;
|
|
44
44
|
export interface TemplateContentBase {
|
|
45
45
|
x?: number;
|
|
46
46
|
y?: number;
|
|
@@ -107,4 +107,4 @@ export interface BaseItemTransform {
|
|
|
107
107
|
*/
|
|
108
108
|
quat?: vec4;
|
|
109
109
|
}
|
|
110
|
-
export
|
|
110
|
+
export type BaseContent = SpriteContent | ParticleContent | NullContent | InteractContent | PluginContent | CompositionContent | CameraContent | FilterContent | TextContent | any;
|
|
@@ -4,7 +4,7 @@ export interface FilterItem extends BaseItem {
|
|
|
4
4
|
content: FilterContent;
|
|
5
5
|
endBehavior: ItemEndBehavior;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export type FilterParams = NoneFilterParams | GaussianFilterParams | BloomFilterPrams | DelayFilterPrams | DistortionFilterParams | CameraMoveFilterParams | AlphaMaskFilterParams | AlphaFrameFilterParams;
|
|
8
8
|
export interface FilterContent {
|
|
9
9
|
options: SpriteContentOptions;
|
|
10
10
|
filter: FilterParams;
|
|
@@ -27,7 +27,7 @@ export interface InteractContent {
|
|
|
27
27
|
/**
|
|
28
28
|
* 交互元素基础属性
|
|
29
29
|
*/
|
|
30
|
-
export
|
|
30
|
+
export type InteractOption = ClickInteractOption | MessageInteractOption | DragInteractOption;
|
|
31
31
|
/**
|
|
32
32
|
* 点击交互元素基础属性
|
|
33
33
|
*/
|
|
@@ -56,7 +56,7 @@ export interface AttributeWithType extends AttributeBase {
|
|
|
56
56
|
dataSource: string;
|
|
57
57
|
type: BufferType;
|
|
58
58
|
}
|
|
59
|
-
export
|
|
59
|
+
export type AttributeJSON = AttributeWithDataPointer | AttributeWithType | AttributeWithDataSource;
|
|
60
60
|
export interface GeometryOptionsJSON {
|
|
61
61
|
name?: string;
|
|
62
62
|
attributes: Record<string, AttributeJSON>;
|
|
@@ -74,12 +74,12 @@ export interface GeometryOptionsJSON {
|
|
|
74
74
|
*/
|
|
75
75
|
maxVertex?: number;
|
|
76
76
|
}
|
|
77
|
-
export
|
|
77
|
+
export type GeometryPointer<T extends BinaryEnv> = T extends 'studio' ? any : GeometryOptionsJSON;
|
|
78
78
|
/**
|
|
79
79
|
* studio 中是 `Texture` 对象
|
|
80
80
|
* json 中是 `GLTFTexture<'json'>` 类型,`imageFileId` 是二进制指针
|
|
81
81
|
* runtime 中是 `scene.textures` 数组的 `index`,`textures` 的创建由 Player 负责
|
|
82
82
|
*/
|
|
83
|
-
export
|
|
84
|
-
export
|
|
85
|
-
export
|
|
83
|
+
export type TexturePointer<T extends BinaryEnv> = T extends 'studio' ? any : number;
|
|
84
|
+
export type SkyboxCubeTexturePointer<T extends BinaryEnv> = T extends 'studio' ? any : number;
|
|
85
|
+
export type ModelAnimationTrackDataPointer<T extends BinaryEnv> = Binary<Float32Array, Float32Array, T>;
|
|
@@ -46,7 +46,7 @@ export interface ModelLightDirOptions extends ModelLightBaseOptions {
|
|
|
46
46
|
export interface ModelAmbientLightOptions extends ModelLightBaseOptions {
|
|
47
47
|
lightType: 'ambient';
|
|
48
48
|
}
|
|
49
|
-
export
|
|
49
|
+
export type ModelLightOptions = ModelLightPointOptions | ModelLightDirOptions | ModelLightSpotOptions | ModelAmbientLightOptions;
|
|
50
50
|
export interface ModelLightContent {
|
|
51
51
|
/**
|
|
52
52
|
* 灯光元素基础属性
|
|
@@ -18,7 +18,7 @@ export declare enum MaterialBlending {
|
|
|
18
18
|
translucent = 102,
|
|
19
19
|
additive = 103
|
|
20
20
|
}
|
|
21
|
-
export
|
|
21
|
+
export type MaterialOptions<T extends BinaryEnv> = MaterialUnlitOptions<T> | MaterialPBROptions<T>;
|
|
22
22
|
export interface MaterialUnlitOptions<T extends BinaryEnv> {
|
|
23
23
|
name: string;
|
|
24
24
|
type: MaterialType.unlit;
|
|
@@ -5,7 +5,7 @@ import type { GeometryPointer } from './binary';
|
|
|
5
5
|
import type { vec3 } from '../../numberExpression';
|
|
6
6
|
import type { InteractBehavior, ItemType } from '../../type';
|
|
7
7
|
import type { ModelAnimationTrackDataPointer } from './binary';
|
|
8
|
-
export
|
|
8
|
+
export type BufferType = WebGLRenderingContext['FLOAT'] | WebGLRenderingContext['INT'] | WebGLRenderingContext['SHORT'] | WebGLRenderingContext['BYTE'] | WebGLRenderingContext['UNSIGNED_INT'] | WebGLRenderingContext['UNSIGNED_SHORT'] | WebGLRenderingContext['UNSIGNED_BYTE'];
|
|
9
9
|
export interface PrimitiveOptions<T extends BinaryEnv> {
|
|
10
10
|
geometry: GeometryPointer<T>;
|
|
11
11
|
material: MaterialOptions<T>;
|
|
@@ -53,7 +53,7 @@ export interface ModelItemBoundingSphere {
|
|
|
53
53
|
*/
|
|
54
54
|
radius: number;
|
|
55
55
|
}
|
|
56
|
-
export
|
|
56
|
+
export type ModelItemBounding = ModelItemBoundingBox | ModelItemBoundingSphere;
|
|
57
57
|
export interface ModelMeshItemContent<T extends BinaryEnv> {
|
|
58
58
|
options: ModelMeshOptions<T>;
|
|
59
59
|
interaction?: ModelItemBounding;
|
|
@@ -52,7 +52,7 @@ export interface ParticleShapeNone {
|
|
|
52
52
|
turbulenceZ?: NumberExpression;
|
|
53
53
|
upDirection?: number[];
|
|
54
54
|
}
|
|
55
|
-
export
|
|
55
|
+
export type ParticleShape = ParticleShapeCone | ParticleShapeCircle | ParticleShapeSphere | ParticleShapeHemisphere | ParticleShapeDonut | ParticleShapeRect | ParticleShapeRectEdge | ParticleShapeTexture | ParticleShapeEdge | ParticleShapeNone;
|
|
56
56
|
/**
|
|
57
57
|
* 圆锥发射器
|
|
58
58
|
*/
|
package/dist/src/item.d.ts
CHANGED
|
@@ -14,4 +14,4 @@ import type { TextItem } from './item/text-item';
|
|
|
14
14
|
* 1.0版本
|
|
15
15
|
* 基类,无对应元素
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export type Item = SpriteItem | ParticleItem | NullItem | PluginItem | InteractItem | FilterItem | CameraItem | TextItem | ModelMeshItem<'json'> | ModelSkyboxItem<'json'> | ModelTreeItem<'json'> | ModelLightItem | ModelCameraItem | SpineItem | CompositionItem | ModelMeshItem<'studio'> | ModelSkyboxItem<'studio'> | ModelTreeItem<'studio'>;
|
|
@@ -70,11 +70,11 @@ export declare enum ValueType {
|
|
|
70
70
|
*/
|
|
71
71
|
BEZIER_CURVE_PATH = 22
|
|
72
72
|
}
|
|
73
|
-
export
|
|
74
|
-
export
|
|
75
|
-
export
|
|
76
|
-
export
|
|
77
|
-
export
|
|
73
|
+
export type vec2 = [x: number, y: number];
|
|
74
|
+
export type vec3 = [x: number, y: number, z: number];
|
|
75
|
+
export type vec4 = [x: number, y: number, z: number, w: number];
|
|
76
|
+
export type mat2 = [m11: number, m12: number, m21: number, m22: number];
|
|
77
|
+
export type mat3 = [
|
|
78
78
|
m11: number,
|
|
79
79
|
m12: number,
|
|
80
80
|
m13: number,
|
|
@@ -85,7 +85,7 @@ export declare type mat3 = [
|
|
|
85
85
|
m32: number,
|
|
86
86
|
m33: number
|
|
87
87
|
];
|
|
88
|
-
export
|
|
88
|
+
export type mat4 = [
|
|
89
89
|
m11: number,
|
|
90
90
|
m12: number,
|
|
91
91
|
m13: number,
|
|
@@ -105,44 +105,44 @@ export declare type mat4 = [
|
|
|
105
105
|
];
|
|
106
106
|
/*********************************************/
|
|
107
107
|
/*********************************************/
|
|
108
|
-
export
|
|
109
|
-
export
|
|
110
|
-
export
|
|
111
|
-
export
|
|
108
|
+
export type FunctionExpression = LineValue | CurveValue | BezierValue;
|
|
109
|
+
export type FixedNumberExpression = ConstantNumber | LineValue | CurveValue | BezierValue;
|
|
110
|
+
export type NumberExpression = FixedNumberExpression | RandomValue;
|
|
111
|
+
export type FixedVec3Expression = ConstantVec3 | BezierPath | LinearPath | BezierCurvePath;
|
|
112
112
|
/**
|
|
113
113
|
* 常数数值
|
|
114
114
|
* [0,5]
|
|
115
115
|
* [1,[1,2]]
|
|
116
116
|
* [2,[1,2,3]]
|
|
117
117
|
*/
|
|
118
|
-
export
|
|
119
|
-
export
|
|
120
|
-
export
|
|
121
|
-
export
|
|
118
|
+
export type ConstantNumber = [type: ValueType.CONSTANT, value: number];
|
|
119
|
+
export type ConstantVec2 = [type: ValueType.CONSTANT_VEC2, value: vec2];
|
|
120
|
+
export type ConstantVec3 = [type: ValueType.CONSTANT_VEC3, value: vec3];
|
|
121
|
+
export type ConstantVec4 = [type: ValueType.CONSTANT_VEC4, value: vec4];
|
|
122
122
|
/**
|
|
123
123
|
* 随机数数值
|
|
124
124
|
*/
|
|
125
|
-
export
|
|
125
|
+
export type RandomValue = [type: ValueType.RANDOM, value: [min: number, max: number]];
|
|
126
126
|
/**
|
|
127
127
|
* 直线段数值
|
|
128
128
|
*/
|
|
129
|
-
export
|
|
130
|
-
export
|
|
129
|
+
export type LineValue = [type: ValueType.LINE, value: [time: number, value: number][]];
|
|
130
|
+
export type CurveEasingPoint = [time: number, value: number, tanIn: number, tanOut: number];
|
|
131
131
|
/**
|
|
132
132
|
* 曲线段数值
|
|
133
133
|
*/
|
|
134
|
-
export
|
|
134
|
+
export type CurveValue = [type: ValueType.CURVE, value: CurveEasingPoint[]];
|
|
135
135
|
/**
|
|
136
136
|
* 贝塞尔路径数值
|
|
137
137
|
*/
|
|
138
|
-
export
|
|
139
|
-
export
|
|
138
|
+
export type BezierPath = [type: ValueType.BEZIER_PATH, value: BezierPathValue];
|
|
139
|
+
export type BezierPathValue = [
|
|
140
140
|
easing: CurveEasingPoint[],
|
|
141
141
|
points: vec3[],
|
|
142
142
|
controlPoints: vec3[]
|
|
143
143
|
];
|
|
144
|
-
export
|
|
145
|
-
export
|
|
144
|
+
export type LinearPath = [type: ValueType.LINEAR_PATH, value: LinearPathValue];
|
|
145
|
+
export type LinearPathValue = [
|
|
146
146
|
easing: CurveEasingPoint[],
|
|
147
147
|
points: vec3[]
|
|
148
148
|
];
|
|
@@ -161,7 +161,7 @@ export declare enum BezierKeyframeType {
|
|
|
161
161
|
/**
|
|
162
162
|
* 缓动关键帧数据(有三个点:左曲线控制点、曲线点、右曲线控制点,auto:自动关键帧)
|
|
163
163
|
*/
|
|
164
|
-
export
|
|
164
|
+
export type EaseKeyframeValue = [
|
|
165
165
|
type: BezierKeyframeType.EASE,
|
|
166
166
|
value: [x1: number, y1: number, x2: number, y2: number, x3: number, y3: number],
|
|
167
167
|
markType?: BezierKeyframeType
|
|
@@ -169,7 +169,7 @@ export declare type EaseKeyframeValue = [
|
|
|
169
169
|
/**
|
|
170
170
|
* 缓入关键帧数据(有两个点:左曲线控制点、曲线点)
|
|
171
171
|
*/
|
|
172
|
-
export
|
|
172
|
+
export type EaseInKeyframeValue = [
|
|
173
173
|
type: BezierKeyframeType.EASE_IN,
|
|
174
174
|
value: [x1: number, y1: number, x2: number, y2: number],
|
|
175
175
|
markType?: BezierKeyframeType
|
|
@@ -177,7 +177,7 @@ export declare type EaseInKeyframeValue = [
|
|
|
177
177
|
/**
|
|
178
178
|
* 缓出关键帧数据(有两个点:曲线点、右曲线控制点)
|
|
179
179
|
*/
|
|
180
|
-
export
|
|
180
|
+
export type EaseOutKeyframeValue = [
|
|
181
181
|
type: BezierKeyframeType.EASE_OUT,
|
|
182
182
|
value: [x2: number, y2: number, x3: number, y3: number],
|
|
183
183
|
markType?: BezierKeyframeType
|
|
@@ -185,7 +185,7 @@ export declare type EaseOutKeyframeValue = [
|
|
|
185
185
|
/**
|
|
186
186
|
* 线性关键帧数据(有一个点:曲线点)
|
|
187
187
|
*/
|
|
188
|
-
export
|
|
188
|
+
export type LineKeyframeValue = [
|
|
189
189
|
type: BezierKeyframeType.LINE,
|
|
190
190
|
value: [x2: number, y2: number],
|
|
191
191
|
markType?: BezierKeyframeType
|
|
@@ -193,7 +193,7 @@ export declare type LineKeyframeValue = [
|
|
|
193
193
|
/**
|
|
194
194
|
* 缓动定格出关键帧(有两个点:左曲线控制点、曲线点)
|
|
195
195
|
*/
|
|
196
|
-
export
|
|
196
|
+
export type EaseHoldOutKeyframeValue = [
|
|
197
197
|
type: BezierKeyframeType.HOLD,
|
|
198
198
|
value: [x1: number, y1: number, x2: number, y2: number],
|
|
199
199
|
markType: BezierKeyframeType.EASE_IN
|
|
@@ -201,7 +201,7 @@ export declare type EaseHoldOutKeyframeValue = [
|
|
|
201
201
|
/**
|
|
202
202
|
* 缓动定格出关键帧(有两个点:曲线点、右曲线控制点)
|
|
203
203
|
*/
|
|
204
|
-
export
|
|
204
|
+
export type EaseHoldInKeyframeValue = [
|
|
205
205
|
type: BezierKeyframeType.HOLD,
|
|
206
206
|
value: [x1: number, y1: number, x2: number, y2: number],
|
|
207
207
|
markType: BezierKeyframeType.EASE_OUT
|
|
@@ -209,7 +209,7 @@ export declare type EaseHoldInKeyframeValue = [
|
|
|
209
209
|
/**
|
|
210
210
|
* 线性定格出关键帧(有一个点:曲线点)
|
|
211
211
|
*/
|
|
212
|
-
export
|
|
212
|
+
export type LineHoldOutKeyframeValue = [
|
|
213
213
|
type: BezierKeyframeType.HOLD,
|
|
214
214
|
value: [x2: number, y2: number],
|
|
215
215
|
markType: BezierKeyframeType.LINE
|
|
@@ -217,7 +217,7 @@ export declare type LineHoldOutKeyframeValue = [
|
|
|
217
217
|
/**
|
|
218
218
|
* 线性定格进关键帧(有一个点:曲线点)
|
|
219
219
|
*/
|
|
220
|
-
export
|
|
220
|
+
export type LineHoldInKeyframeValue = [
|
|
221
221
|
type: BezierKeyframeType.HOLD,
|
|
222
222
|
value: [x2: number, y2: number],
|
|
223
223
|
markType: BezierKeyframeType.LINE_OUT
|
|
@@ -225,7 +225,7 @@ export declare type LineHoldInKeyframeValue = [
|
|
|
225
225
|
/**
|
|
226
226
|
* 定格进出关键帧(有一个点:曲线点)
|
|
227
227
|
*/
|
|
228
|
-
export
|
|
228
|
+
export type HoldInOutKeyframeValue = [
|
|
229
229
|
type: BezierKeyframeType.HOLD,
|
|
230
230
|
value: [x2: number, y2: number],
|
|
231
231
|
markType: BezierKeyframeType.HOLD
|
|
@@ -233,47 +233,47 @@ export declare type HoldInOutKeyframeValue = [
|
|
|
233
233
|
/**
|
|
234
234
|
* 定格关键帧
|
|
235
235
|
*/
|
|
236
|
-
export
|
|
236
|
+
export type HoldKeyframeValue = EaseHoldOutKeyframeValue | EaseHoldInKeyframeValue | LineHoldOutKeyframeValue | LineHoldInKeyframeValue | HoldInOutKeyframeValue;
|
|
237
237
|
/**
|
|
238
238
|
* 贝塞尔关键帧值
|
|
239
239
|
*/
|
|
240
|
-
export
|
|
240
|
+
export type BezierKeyframeValue = EaseKeyframeValue | EaseInKeyframeValue | EaseOutKeyframeValue | LineKeyframeValue | HoldKeyframeValue;
|
|
241
241
|
/**
|
|
242
242
|
* 贝塞尔关键帧
|
|
243
243
|
*/
|
|
244
|
-
export
|
|
244
|
+
export type BezierValue = [type: ValueType.BEZIER_CURVE, value: BezierKeyframeValue[]];
|
|
245
245
|
/**
|
|
246
246
|
* 贝塞尔曲线路径关键帧值
|
|
247
247
|
*/
|
|
248
|
-
export
|
|
248
|
+
export type BezierCurvePathValue = [easing: BezierKeyframeValue[], points: vec3[], controlePoints: vec3[]];
|
|
249
249
|
/**
|
|
250
250
|
* 贝塞尔曲线路径关键帧
|
|
251
251
|
*/
|
|
252
|
-
export
|
|
252
|
+
export type BezierCurvePath = [type: ValueType.BEZIER_CURVE_PATH, value: BezierCurvePathValue];
|
|
253
253
|
/*********************************************/
|
|
254
254
|
/*********************************************/
|
|
255
|
-
export
|
|
255
|
+
export type ColorExpression = RGBAColor | GradientColor | RGBAColors;
|
|
256
256
|
/**
|
|
257
257
|
* rgba range in [0,255]
|
|
258
258
|
*/
|
|
259
|
-
export
|
|
259
|
+
export type RGBAColorValue = [r: number, g: number, b: number, a: number];
|
|
260
260
|
/**
|
|
261
261
|
* 颜色数值
|
|
262
262
|
*/
|
|
263
|
-
export
|
|
263
|
+
export type RGBAColor = [type: ValueType.RGBA_COLOR, value: RGBAColorValue];
|
|
264
264
|
/**
|
|
265
265
|
* 渐变色数值
|
|
266
266
|
*/
|
|
267
|
-
export
|
|
268
|
-
export
|
|
269
|
-
export
|
|
267
|
+
export type GradientStop = [stop: number, r: number, g: number, b: number, a: number];
|
|
268
|
+
export type GradientColor = [type: ValueType.GRADIENT_COLOR, value: GradientStop[]];
|
|
269
|
+
export type RGBAColors = [type: ValueType.COLORS, value: RGBAColorValue[]];
|
|
270
270
|
/*********************************************/
|
|
271
271
|
/*********************************************/
|
|
272
272
|
/**
|
|
273
273
|
* 蒙版形状控制点数值
|
|
274
274
|
*/
|
|
275
|
-
export
|
|
275
|
+
export type ShapePoints = [type: ValueType.SHAPE_POINTS, value: [x: number, y: number, xIn: number, yIn: number, xOut: number, yOut: number][]];
|
|
276
276
|
/**
|
|
277
277
|
* 蒙版形状采样分割点数值
|
|
278
278
|
*/
|
|
279
|
-
export
|
|
279
|
+
export type ShapeSplits = [type: ValueType.SHAPE_SPLITS, value: number[][]];
|
package/dist/src/scene.d.ts
CHANGED
package/dist/src/type.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-specification",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Galacean Effects JSON Specification",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
"prepare": "husky install",
|
|
34
34
|
"prepublishOnly": "npm run build"
|
|
35
35
|
},
|
|
36
|
+
"browserslist": [
|
|
37
|
+
"iOS 9"
|
|
38
|
+
],
|
|
36
39
|
"devDependencies": {
|
|
37
40
|
"@commitlint/cli": "^13.2.1",
|
|
38
41
|
"@commitlint/config-conventional": "^13.2.0",
|
|
@@ -48,6 +51,7 @@
|
|
|
48
51
|
"chai": "^4.3.6",
|
|
49
52
|
"chai-spies": "^1.0.0",
|
|
50
53
|
"eslint": "^8.13.0",
|
|
54
|
+
"eslint-plugin-compat": "^4.2.0",
|
|
51
55
|
"eslint-plugin-promise": "^6.1.1",
|
|
52
56
|
"husky": "^7.0.4",
|
|
53
57
|
"lint-staged": "^11.2.6",
|