@galacean/effects-specification 2.1.0 → 2.2.0-alpha.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/es/constants.d.ts +6 -0
- package/es/constants.js +6 -0
- package/es/curve-data/index.d.ts +1 -1
- package/es/curve-data/index.js +1 -1
- package/es/curve-data/{vector4-curve-data.d.ts → vector-curve-datas.d.ts} +9 -0
- package/es/data-type.d.ts +10 -7
- package/es/data-type.js +12 -7
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -0
- package/es/number-expression.d.ts +10 -2
- package/es/number-expression.js +4 -0
- package/es/scene.d.ts +5 -1
- package/es/scene.js +5 -1
- package/es/shape/custom-shape-data.d.ts +0 -5
- package/es/shape/ellipse-data.d.ts +0 -5
- package/es/shape/polygon-data.d.ts +0 -5
- package/es/shape/rectangle-data.d.ts +0 -5
- package/es/shape/shape-component-data.d.ts +5 -0
- package/es/shape/star-data.d.ts +0 -5
- package/package.json +13 -11
- /package/es/curve-data/{vector4-curve-data.js → vector-curve-datas.js} +0 -0
package/es/constants.d.ts
CHANGED
|
@@ -30,5 +30,11 @@ export declare const END_BEHAVIOR_RESTART = 5;
|
|
|
30
30
|
export declare const END_BEHAVIOR_DESTROY_CHILDREN = 6;
|
|
31
31
|
export declare const CAMERA_CLIP_MODE_VERTICAL = 1;
|
|
32
32
|
export declare const CAMERA_CLIP_MODE_NORMAL = 0;
|
|
33
|
+
/**
|
|
34
|
+
* 消息开始
|
|
35
|
+
*/
|
|
33
36
|
export declare const MESSAGE_ITEM_PHRASE_BEGIN = 2;
|
|
37
|
+
/**
|
|
38
|
+
* 消息结束
|
|
39
|
+
*/
|
|
34
40
|
export declare const MESSAGE_ITEM_PHRASE_END = 1;
|
package/es/constants.js
CHANGED
|
@@ -30,5 +30,11 @@ export const END_BEHAVIOR_RESTART = 5;
|
|
|
30
30
|
export const END_BEHAVIOR_DESTROY_CHILDREN = 6;
|
|
31
31
|
export const CAMERA_CLIP_MODE_VERTICAL = 1;
|
|
32
32
|
export const CAMERA_CLIP_MODE_NORMAL = 0;
|
|
33
|
+
/**
|
|
34
|
+
* 消息开始
|
|
35
|
+
*/
|
|
33
36
|
export const MESSAGE_ITEM_PHRASE_BEGIN = 2;
|
|
37
|
+
/**
|
|
38
|
+
* 消息结束
|
|
39
|
+
*/
|
|
34
40
|
export const MESSAGE_ITEM_PHRASE_END = 1;
|
package/es/curve-data/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './color-curve-data';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './vector-curve-datas';
|
package/es/curve-data/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './color-curve-data';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './vector-curve-datas';
|
package/es/data-type.d.ts
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
export declare enum DataType {
|
|
2
2
|
VFXItemData = "VFXItemData",
|
|
3
|
-
EffectComponent = "EffectComponent",
|
|
4
3
|
Material = "Material",
|
|
5
4
|
Shader = "Shader",
|
|
6
|
-
SpriteComponent = "SpriteComponent",
|
|
7
|
-
ParticleSystem = "ParticleSystem",
|
|
8
|
-
InteractComponent = "InteractComponent",
|
|
9
|
-
CameraController = "CameraController",
|
|
10
|
-
PostProcessVolume = "PostProcessVolume",
|
|
11
5
|
Geometry = "Geometry",
|
|
12
6
|
Texture = "Texture",
|
|
13
7
|
Image = "Image",
|
|
14
8
|
AnimationClip = "AnimationClip",
|
|
15
|
-
TextComponent = "TextComponent",
|
|
16
9
|
BinaryAsset = "BinaryAsset",
|
|
17
10
|
TrackAsset = "TrackAsset",
|
|
18
11
|
TimelineAsset = "TimelineAsset",
|
|
@@ -23,6 +16,7 @@ export declare enum DataType {
|
|
|
23
16
|
SubCompositionTrack = "SubCompositionTrack",
|
|
24
17
|
FloatPropertyTrack = "FloatPropertyTrack",
|
|
25
18
|
ColorPropertyTrack = "ColorPropertyTrack",
|
|
19
|
+
Vector2PropertyTrack = "Vector2PropertyTrack",
|
|
26
20
|
Vector4PropertyTrack = "Vector4PropertyTrack",
|
|
27
21
|
TransformPlayableAsset = "TransformPlayableAsset",
|
|
28
22
|
SpriteColorPlayableAsset = "SpriteColorPlayableAsset",
|
|
@@ -30,6 +24,8 @@ export declare enum DataType {
|
|
|
30
24
|
SubCompositionPlayableAsset = "SubCompositionPlayableAsset",
|
|
31
25
|
FloatPropertyPlayableAsset = "FloatPropertyPlayableAsset",
|
|
32
26
|
ColorPropertyPlayableAsset = "ColorPropertyPlayableAsset",
|
|
27
|
+
Vector2PropertyPlayableAsset = "Vector2PropertyPlayableAsset",
|
|
28
|
+
Vector4PropertyPlayableAsset = "Vector4PropertyPlayableAsset",
|
|
33
29
|
MeshComponent = "MeshComponent",
|
|
34
30
|
SkyboxComponent = "SkyboxComponent",
|
|
35
31
|
LightComponent = "LightComponent",
|
|
@@ -43,5 +39,12 @@ export declare enum DataType {
|
|
|
43
39
|
RichTextComponent = "RichTextComponent",
|
|
44
40
|
OrientationComponent = "OrientationComponent",
|
|
45
41
|
ShapeComponent = "ShapeComponent",
|
|
42
|
+
SpriteComponent = "SpriteComponent",
|
|
43
|
+
ParticleSystem = "ParticleSystem",
|
|
44
|
+
InteractComponent = "InteractComponent",
|
|
45
|
+
CameraController = "CameraController",
|
|
46
|
+
PostProcessVolume = "PostProcessVolume",
|
|
47
|
+
EffectComponent = "EffectComponent",
|
|
48
|
+
TextComponent = "TextComponent",
|
|
46
49
|
TimelineClip = "TimelineClip"
|
|
47
50
|
}
|
package/es/data-type.js
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
export var DataType;
|
|
2
2
|
(function (DataType) {
|
|
3
3
|
DataType["VFXItemData"] = "VFXItemData";
|
|
4
|
-
|
|
4
|
+
// Assets
|
|
5
5
|
DataType["Material"] = "Material";
|
|
6
6
|
DataType["Shader"] = "Shader";
|
|
7
|
-
DataType["SpriteComponent"] = "SpriteComponent";
|
|
8
|
-
DataType["ParticleSystem"] = "ParticleSystem";
|
|
9
|
-
DataType["InteractComponent"] = "InteractComponent";
|
|
10
|
-
DataType["CameraController"] = "CameraController";
|
|
11
|
-
DataType["PostProcessVolume"] = "PostProcessVolume";
|
|
12
7
|
DataType["Geometry"] = "Geometry";
|
|
13
8
|
DataType["Texture"] = "Texture";
|
|
14
9
|
DataType["Image"] = "Image";
|
|
15
10
|
DataType["AnimationClip"] = "AnimationClip";
|
|
16
|
-
DataType["TextComponent"] = "TextComponent";
|
|
17
11
|
DataType["BinaryAsset"] = "BinaryAsset";
|
|
18
12
|
// Timeline
|
|
19
13
|
DataType["TrackAsset"] = "TrackAsset";
|
|
@@ -25,6 +19,7 @@ export var DataType;
|
|
|
25
19
|
DataType["SubCompositionTrack"] = "SubCompositionTrack";
|
|
26
20
|
DataType["FloatPropertyTrack"] = "FloatPropertyTrack";
|
|
27
21
|
DataType["ColorPropertyTrack"] = "ColorPropertyTrack";
|
|
22
|
+
DataType["Vector2PropertyTrack"] = "Vector2PropertyTrack";
|
|
28
23
|
DataType["Vector4PropertyTrack"] = "Vector4PropertyTrack";
|
|
29
24
|
DataType["TransformPlayableAsset"] = "TransformPlayableAsset";
|
|
30
25
|
DataType["SpriteColorPlayableAsset"] = "SpriteColorPlayableAsset";
|
|
@@ -32,6 +27,9 @@ export var DataType;
|
|
|
32
27
|
DataType["SubCompositionPlayableAsset"] = "SubCompositionPlayableAsset";
|
|
33
28
|
DataType["FloatPropertyPlayableAsset"] = "FloatPropertyPlayableAsset";
|
|
34
29
|
DataType["ColorPropertyPlayableAsset"] = "ColorPropertyPlayableAsset";
|
|
30
|
+
DataType["Vector2PropertyPlayableAsset"] = "Vector2PropertyPlayableAsset";
|
|
31
|
+
DataType["Vector4PropertyPlayableAsset"] = "Vector4PropertyPlayableAsset";
|
|
32
|
+
// Components
|
|
35
33
|
DataType["MeshComponent"] = "MeshComponent";
|
|
36
34
|
DataType["SkyboxComponent"] = "SkyboxComponent";
|
|
37
35
|
DataType["LightComponent"] = "LightComponent";
|
|
@@ -45,6 +43,13 @@ export var DataType;
|
|
|
45
43
|
DataType["RichTextComponent"] = "RichTextComponent";
|
|
46
44
|
DataType["OrientationComponent"] = "OrientationComponent";
|
|
47
45
|
DataType["ShapeComponent"] = "ShapeComponent";
|
|
46
|
+
DataType["SpriteComponent"] = "SpriteComponent";
|
|
47
|
+
DataType["ParticleSystem"] = "ParticleSystem";
|
|
48
|
+
DataType["InteractComponent"] = "InteractComponent";
|
|
49
|
+
DataType["CameraController"] = "CameraController";
|
|
50
|
+
DataType["PostProcessVolume"] = "PostProcessVolume";
|
|
51
|
+
DataType["EffectComponent"] = "EffectComponent";
|
|
52
|
+
DataType["TextComponent"] = "TextComponent";
|
|
48
53
|
// Non-EffectObject
|
|
49
54
|
DataType["TimelineClip"] = "TimelineClip";
|
|
50
55
|
})(DataType || (DataType = {}));
|
package/es/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSONSceneVersion } from './scene';
|
|
1
2
|
export * from './type';
|
|
2
3
|
export * from './composition';
|
|
3
4
|
export * from './texture';
|
|
@@ -39,3 +40,4 @@ export * from './material-data';
|
|
|
39
40
|
export * from './geometry-data';
|
|
40
41
|
export * from './shader-data';
|
|
41
42
|
export * from './effects-package-data';
|
|
43
|
+
export declare const LATEST_VERSION = JSONSceneVersion['LATEST'];
|
package/es/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSONSceneVersion } from './scene';
|
|
1
2
|
export * from './type';
|
|
2
3
|
export * from './composition';
|
|
3
4
|
export * from './texture';
|
|
@@ -39,3 +40,4 @@ export * from './material-data';
|
|
|
39
40
|
export * from './geometry-data';
|
|
40
41
|
export * from './shader-data';
|
|
41
42
|
export * from './effects-package-data';
|
|
43
|
+
export const LATEST_VERSION = JSONSceneVersion.LATEST;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ColorCurveData, Vector4CurveData } from './curve-data';
|
|
1
|
+
import type { ColorCurveData, Vector2CurveData, Vector4CurveData } from './curve-data';
|
|
2
2
|
/*********************************************/
|
|
3
3
|
/*********************************************/
|
|
4
4
|
export declare enum ValueType {
|
|
@@ -81,7 +81,11 @@ export declare enum ValueType {
|
|
|
81
81
|
/**
|
|
82
82
|
* Vector4 曲线
|
|
83
83
|
*/
|
|
84
|
-
VECTOR4_CURVE = 25
|
|
84
|
+
VECTOR4_CURVE = 25,
|
|
85
|
+
/**
|
|
86
|
+
* Vector2 曲线
|
|
87
|
+
*/
|
|
88
|
+
VECTOR2_CURVE = 26
|
|
85
89
|
}
|
|
86
90
|
export type vec2 = [x: number, y: number];
|
|
87
91
|
export type vec3 = [x: number, y: number, z: number];
|
|
@@ -280,6 +284,10 @@ export type ColorCurveValue = [type: ValueType.COLOR_CURVE, value: ColorCurveDat
|
|
|
280
284
|
* Vector4 贝塞尔曲线
|
|
281
285
|
*/
|
|
282
286
|
export type Vector4CurveValue = [type: ValueType.VECTOR4_CURVE, value: Vector4CurveData];
|
|
287
|
+
/**
|
|
288
|
+
* Vector2 贝塞尔曲线
|
|
289
|
+
*/
|
|
290
|
+
export type Vector2CurveValue = [type: ValueType.VECTOR2_CURVE, value: Vector2CurveData];
|
|
283
291
|
/*********************************************/
|
|
284
292
|
/*********************************************/
|
|
285
293
|
export type ColorExpression = RGBAColor | GradientColor | RGBAColors;
|
package/es/number-expression.js
CHANGED
|
@@ -83,6 +83,10 @@ export var ValueType;
|
|
|
83
83
|
* Vector4 曲线
|
|
84
84
|
*/
|
|
85
85
|
ValueType[ValueType["VECTOR4_CURVE"] = 25] = "VECTOR4_CURVE";
|
|
86
|
+
/**
|
|
87
|
+
* Vector2 曲线
|
|
88
|
+
*/
|
|
89
|
+
ValueType[ValueType["VECTOR2_CURVE"] = 26] = "VECTOR2_CURVE";
|
|
86
90
|
})(ValueType || (ValueType = {}));
|
|
87
91
|
/**
|
|
88
92
|
* 关键帧类型
|
package/es/scene.d.ts
CHANGED
|
@@ -103,6 +103,10 @@ export interface JSONSceneLegacy {
|
|
|
103
103
|
* 如果是内置模块,但是需要额外的代码引入,比如滤镜则会加入 requires 数组中
|
|
104
104
|
*/
|
|
105
105
|
export type SceneRequire = 'filter';
|
|
106
|
+
export declare enum JSONSceneVersion {
|
|
107
|
+
'3.0' = "3.0",
|
|
108
|
+
'LATEST' = "3.1"
|
|
109
|
+
}
|
|
106
110
|
/**
|
|
107
111
|
* 场景信息
|
|
108
112
|
* 素材信息存放于统一数据结构中
|
|
@@ -115,7 +119,7 @@ export interface JSONScene {
|
|
|
115
119
|
* 3.0 EC 改造、移除滤镜元素
|
|
116
120
|
* 3.1 音视频
|
|
117
121
|
*/
|
|
118
|
-
version:
|
|
122
|
+
version: JSONSceneVersion;
|
|
119
123
|
/**
|
|
120
124
|
* 播放器版本信息
|
|
121
125
|
*/
|
package/es/scene.js
CHANGED
|
@@ -3,7 +3,6 @@ import type { Vector2Data } from '../math';
|
|
|
3
3
|
import type { ShapeComponentData } from './shape-component-data';
|
|
4
4
|
import type { ShapeFillParam } from './shape-fill-param';
|
|
5
5
|
import type { ShapePrimitiveType } from './shape-primitive-type';
|
|
6
|
-
import type { ShapeStrokeParam } from './shape-stroke-param';
|
|
7
6
|
/**
|
|
8
7
|
* 自定义形状点
|
|
9
8
|
*/
|
|
@@ -37,10 +36,6 @@ export interface CustomShape {
|
|
|
37
36
|
* 填充属性
|
|
38
37
|
*/
|
|
39
38
|
fill?: ShapeFillParam;
|
|
40
|
-
/**
|
|
41
|
-
* 描边属性
|
|
42
|
-
*/
|
|
43
|
-
stroke?: ShapeStrokeParam;
|
|
44
39
|
/**
|
|
45
40
|
* 空间变换
|
|
46
41
|
*/
|
|
@@ -2,7 +2,6 @@ import type { TransformData } from '../item/base-item';
|
|
|
2
2
|
import type { ShapeComponentData } from './shape-component-data';
|
|
3
3
|
import type { ShapeFillParam } from './shape-fill-param';
|
|
4
4
|
import type { ShapePrimitiveType } from './shape-primitive-type';
|
|
5
|
-
import type { ShapeStrokeParam } from './shape-stroke-param';
|
|
6
5
|
/**
|
|
7
6
|
* 椭圆组件参数
|
|
8
7
|
*/
|
|
@@ -22,10 +21,6 @@ export interface EllipseData extends ShapeComponentData {
|
|
|
22
21
|
* 填充属性
|
|
23
22
|
*/
|
|
24
23
|
fill?: ShapeFillParam;
|
|
25
|
-
/**
|
|
26
|
-
* 描边属性
|
|
27
|
-
*/
|
|
28
|
-
stroke?: ShapeStrokeParam;
|
|
29
24
|
/**
|
|
30
25
|
* 空间变换
|
|
31
26
|
*/
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { TransformData } from '../item/base-item';
|
|
2
2
|
import type { ShapeComponentData } from './shape-component-data';
|
|
3
3
|
import type { ShapeFillParam } from './shape-fill-param';
|
|
4
|
-
import type { ShapeStrokeParam } from './shape-stroke-param';
|
|
5
4
|
/**
|
|
6
5
|
* 多边形参数
|
|
7
6
|
*/
|
|
@@ -22,10 +21,6 @@ export interface PolygonData extends ShapeComponentData {
|
|
|
22
21
|
* 填充属性
|
|
23
22
|
*/
|
|
24
23
|
fill?: ShapeFillParam;
|
|
25
|
-
/**
|
|
26
|
-
* 描边属性
|
|
27
|
-
*/
|
|
28
|
-
stroke?: ShapeStrokeParam;
|
|
29
24
|
/**
|
|
30
25
|
* 空间变换
|
|
31
26
|
*/
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { TransformData } from '../item/base-item';
|
|
2
2
|
import type { ShapeComponentData } from './shape-component-data';
|
|
3
3
|
import type { ShapeFillParam } from './shape-fill-param';
|
|
4
|
-
import type { ShapeStrokeParam } from './shape-stroke-param';
|
|
5
4
|
/**
|
|
6
5
|
* 矩形参数
|
|
7
6
|
*/
|
|
@@ -22,10 +21,6 @@ export interface RectangleData extends ShapeComponentData {
|
|
|
22
21
|
* 填充属性
|
|
23
22
|
*/
|
|
24
23
|
fill?: ShapeFillParam;
|
|
25
|
-
/**
|
|
26
|
-
* 描边属性
|
|
27
|
-
*/
|
|
28
|
-
stroke?: ShapeStrokeParam;
|
|
29
24
|
/**
|
|
30
25
|
* 空间变换
|
|
31
26
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentData } from '../components/component-data';
|
|
2
2
|
import type { ShapePrimitiveType } from './shape-primitive-type';
|
|
3
|
+
import type { ShapeStrokeParam } from './shape-stroke-param';
|
|
3
4
|
/**
|
|
4
5
|
* 矢量图形组件
|
|
5
6
|
*/
|
|
@@ -8,4 +9,8 @@ export interface ShapeComponentData extends ComponentData {
|
|
|
8
9
|
* 矢量类型
|
|
9
10
|
*/
|
|
10
11
|
type: ShapePrimitiveType;
|
|
12
|
+
/**
|
|
13
|
+
* 描边属性
|
|
14
|
+
*/
|
|
15
|
+
stroke?: ShapeStrokeParam;
|
|
11
16
|
}
|
package/es/shape/star-data.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { TransformData } from '../item/base-item';
|
|
2
2
|
import type { ShapeComponentData } from './shape-component-data';
|
|
3
3
|
import type { ShapeFillParam } from './shape-fill-param';
|
|
4
|
-
import type { ShapeStrokeParam } from './shape-stroke-param';
|
|
5
4
|
/**
|
|
6
5
|
* 星形参数
|
|
7
6
|
*/
|
|
@@ -30,10 +29,6 @@ export interface StarData extends ShapeComponentData {
|
|
|
30
29
|
* 填充属性
|
|
31
30
|
*/
|
|
32
31
|
fill?: ShapeFillParam;
|
|
33
|
-
/**
|
|
34
|
-
* 描边属性
|
|
35
|
-
*/
|
|
36
|
-
stroke?: ShapeStrokeParam;
|
|
37
32
|
/**
|
|
38
33
|
* 空间变换
|
|
39
34
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-specification",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0-alpha.1",
|
|
4
4
|
"description": "Galacean Effects JSON Specification",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"main": "./es/index.js",
|
|
@@ -15,6 +15,17 @@
|
|
|
15
15
|
"types": "./es/index.d.ts"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"prebuild": "pnpm clean",
|
|
20
|
+
"build": "pnpm build:lib",
|
|
21
|
+
"build:lib": "tsc -b tsconfig.build.json",
|
|
22
|
+
"lint": "eslint src --ext .ts,.mjs",
|
|
23
|
+
"lint:fix": "eslint src --fix --quiet --ext .ts,.mjs",
|
|
24
|
+
"check:ts": "tsc -b tsconfig.check.json",
|
|
25
|
+
"clean": "rimraf es/**",
|
|
26
|
+
"prepare": "husky install",
|
|
27
|
+
"prepublishOnly": "npm run build"
|
|
28
|
+
},
|
|
18
29
|
"browserslist": [
|
|
19
30
|
"iOS 9"
|
|
20
31
|
],
|
|
@@ -37,14 +48,5 @@
|
|
|
37
48
|
"publishConfig": {
|
|
38
49
|
"access": "public",
|
|
39
50
|
"registry": "https://registry.npmjs.org"
|
|
40
|
-
},
|
|
41
|
-
"scripts": {
|
|
42
|
-
"prebuild": "pnpm clean",
|
|
43
|
-
"build": "pnpm build:lib",
|
|
44
|
-
"build:lib": "tsc -b tsconfig.build.json",
|
|
45
|
-
"lint": "eslint src --ext .ts,.mjs",
|
|
46
|
-
"lint:fix": "eslint src --fix --quiet --ext .ts,.mjs",
|
|
47
|
-
"check:ts": "tsc -b tsconfig.check.json",
|
|
48
|
-
"clean": "rimraf es/**"
|
|
49
51
|
}
|
|
50
|
-
}
|
|
52
|
+
}
|
|
File without changes
|