@galacean/effects-specification 2.0.0-alpha.0 → 2.0.0-alpha.10
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 +2 -10
- package/{dist/src → es}/binary.d.ts +2 -2
- package/es/binary.js +1 -0
- package/es/buitin-object-guid.d.ts +5 -0
- package/es/buitin-object-guid.js +5 -0
- package/{dist/src → es}/components.d.ts +44 -4
- package/es/components.js +52 -0
- package/{dist/src → es}/composition.d.ts +11 -7
- package/es/composition.js +42 -0
- package/es/constants.js +11 -0
- package/{dist/src → es}/image.d.ts +17 -23
- package/es/image.js +9 -0
- package/{dist/src → es}/index.d.ts +5 -2
- package/es/index.js +26 -0
- package/{dist/src → es}/item/base-item.d.ts +11 -13
- package/es/item/base-item.js +11 -0
- package/{dist/src → es}/item/camera-item.d.ts +2 -2
- package/es/item/camera-item.js +1 -0
- package/{dist/src → es}/item/composition-item.d.ts +1 -1
- package/es/item/composition-item.js +1 -0
- package/es/item/effect-item.d.ts +35 -0
- package/es/item/effect-item.js +1 -0
- package/{dist/src → es}/item/interact-item.d.ts +2 -2
- package/es/item/interact-item.js +1 -0
- package/es/item/model/binary.js +1 -0
- package/{dist/src → es}/item/model/camera.d.ts +20 -4
- package/es/item/model/camera.js +5 -0
- package/es/item/model/index.js +35 -0
- package/{dist/src → es}/item/model/light.d.ts +1 -1
- package/es/item/model/light.js +19 -0
- package/{dist/src → es}/item/model/material.d.ts +4 -4
- package/es/item/model/material.js +16 -0
- package/{dist/src → es}/item/model/mesh.d.ts +4 -4
- package/es/item/model/mesh.js +5 -0
- package/es/item/model/render.js +42 -0
- package/{dist/src → es}/item/model/skybox.d.ts +1 -1
- package/es/item/model/skybox.js +1 -0
- package/es/item/model/tree.js +1 -0
- package/{dist/src → es}/item/null-item.d.ts +1 -1
- package/es/item/null-item.js +1 -0
- package/{dist/src → es}/item/particle-item.d.ts +2 -5
- package/es/item/particle-item.js +14 -0
- package/{dist/src → es}/item/particle-shape.d.ts +1 -1
- package/es/item/particle-shape.js +19 -0
- package/es/item/plugin-item.js +1 -0
- package/es/item/spine-item.js +1 -0
- package/{dist/src → es}/item/sprite-item.d.ts +2 -2
- package/es/item/sprite-item.js +1 -0
- package/{dist/src → es}/item/text-item.d.ts +3 -3
- package/es/item/text-item.js +1 -0
- package/{dist/src → es}/item.d.ts +1 -2
- package/es/item.js +1 -0
- package/{dist/src/numberExpression.d.ts → es/number-expression.d.ts} +6 -6
- package/es/number-expression.js +87 -0
- package/{dist/src → es}/scene.d.ts +9 -16
- package/es/scene.js +1 -0
- package/{dist/src → es}/text.d.ts +1 -7
- package/es/text.js +84 -0
- package/{dist/src → es}/type.d.ts +26 -10
- package/es/type.js +327 -0
- package/{dist/src → es}/vfx-item-data.d.ts +3 -3
- package/es/vfx-item-data.js +1 -0
- package/package.json +26 -46
- package/dist/fallback/camera.d.ts +0 -2
- package/dist/fallback/filter.d.ts +0 -2
- package/dist/fallback/index.d.ts +0 -12
- package/dist/fallback/interact.d.ts +0 -2
- package/dist/fallback/migration.d.ts +0 -9
- package/dist/fallback/particle.d.ts +0 -2
- package/dist/fallback/sprite.d.ts +0 -3
- package/dist/fallback/utils.d.ts +0 -29
- package/dist/fallback.js +0 -1731
- package/dist/fallback.js.map +0 -1
- package/dist/fallback.mjs +0 -1706
- package/dist/fallback.mjs.map +0 -1
- package/dist/index.js +0 -731
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -716
- package/dist/index.mjs.map +0 -1
- package/dist/src/item/filter-item.d.ts +0 -99
- /package/{dist/src → es}/constants.d.ts +0 -0
- /package/{dist/src → es}/item/model/binary.d.ts +0 -0
- /package/{dist/src → es}/item/model/index.d.ts +0 -0
- /package/{dist/src → es}/item/model/render.d.ts +0 -0
- /package/{dist/src → es}/item/model/tree.d.ts +0 -0
- /package/{dist/src → es}/item/plugin-item.d.ts +0 -0
- /package/{dist/src → es}/item/spine-item.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RGBAColorValue } from '../../
|
|
1
|
+
import type { RGBAColorValue } from '../../number-expression';
|
|
2
2
|
import type { BaseItem, ItemEndBehavior } from '../base-item';
|
|
3
3
|
import type { RotationOverLifetime, PositionOverLifetime, ItemType } from '../../type';
|
|
4
4
|
import type { ColorData, ComponentData } from '../../components';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export var LightType;
|
|
2
|
+
(function (LightType) {
|
|
3
|
+
/**
|
|
4
|
+
* 点光源
|
|
5
|
+
*/
|
|
6
|
+
LightType["point"] = "point";
|
|
7
|
+
/**
|
|
8
|
+
* 聚光灯
|
|
9
|
+
*/
|
|
10
|
+
LightType["spot"] = "spot";
|
|
11
|
+
/**
|
|
12
|
+
* 方向光
|
|
13
|
+
*/
|
|
14
|
+
LightType["directional"] = "directional";
|
|
15
|
+
/**
|
|
16
|
+
* 环境光
|
|
17
|
+
*/
|
|
18
|
+
LightType["ambient"] = "ambient";
|
|
19
|
+
})(LightType || (LightType = {}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RGBAColorValue, vec2 } from '../../
|
|
1
|
+
import type { RGBAColorValue, vec2 } from '../../number-expression';
|
|
2
2
|
import type { BinaryEnv } from '../../binary';
|
|
3
3
|
import type { SideMode } from '../../type';
|
|
4
4
|
import type { TexturePointer } from './binary';
|
|
@@ -13,9 +13,9 @@ export declare enum MaterialType {
|
|
|
13
13
|
hair = "hair"
|
|
14
14
|
}
|
|
15
15
|
export declare enum MaterialBlending {
|
|
16
|
-
opaque = 100
|
|
17
|
-
masked = 101
|
|
18
|
-
translucent = 102
|
|
16
|
+
opaque = 100,// 不透明
|
|
17
|
+
masked = 101,// 遮罩
|
|
18
|
+
translucent = 102,// 半透明
|
|
19
19
|
additive = 103
|
|
20
20
|
}
|
|
21
21
|
export type MaterialOptions<T extends BinaryEnv> = MaterialUnlitOptions<T> | MaterialPBROptions<T>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// 材质类型
|
|
2
|
+
export var MaterialType;
|
|
3
|
+
(function (MaterialType) {
|
|
4
|
+
MaterialType["unlit"] = "unlit";
|
|
5
|
+
MaterialType["pbr"] = "pbr";
|
|
6
|
+
// 头发材质,在 pbr 材质基础上扩展
|
|
7
|
+
MaterialType["hair"] = "hair";
|
|
8
|
+
})(MaterialType || (MaterialType = {}));
|
|
9
|
+
// 混合模式
|
|
10
|
+
export var MaterialBlending;
|
|
11
|
+
(function (MaterialBlending) {
|
|
12
|
+
MaterialBlending[MaterialBlending["opaque"] = 100] = "opaque";
|
|
13
|
+
MaterialBlending[MaterialBlending["masked"] = 101] = "masked";
|
|
14
|
+
MaterialBlending[MaterialBlending["translucent"] = 102] = "translucent";
|
|
15
|
+
MaterialBlending[MaterialBlending["additive"] = 103] = "additive";
|
|
16
|
+
})(MaterialBlending || (MaterialBlending = {}));
|
|
@@ -2,10 +2,10 @@ import type { BinaryEnv } from '../../binary';
|
|
|
2
2
|
import type { BaseItem, ItemEndBehavior } from '../base-item';
|
|
3
3
|
import type { MaterialOptions } from './material';
|
|
4
4
|
import type { GeometryPointer } from './binary';
|
|
5
|
-
import type { vec3 } from '../../
|
|
5
|
+
import type { vec3 } from '../../number-expression';
|
|
6
6
|
import type { InteractBehavior, ItemType } from '../../type';
|
|
7
7
|
import type { ModelAnimationTrackDataPointer } from './binary';
|
|
8
|
-
import type { ComponentData, DataPath
|
|
8
|
+
import type { ComponentData, DataPath } from '../../components';
|
|
9
9
|
export type BufferType = WebGLRenderingContext['FLOAT'] | WebGLRenderingContext['INT'] | WebGLRenderingContext['SHORT'] | WebGLRenderingContext['BYTE'] | WebGLRenderingContext['UNSIGNED_INT'] | WebGLRenderingContext['UNSIGNED_SHORT'] | WebGLRenderingContext['UNSIGNED_BYTE'];
|
|
10
10
|
export interface PrimitiveOptions<T extends BinaryEnv> {
|
|
11
11
|
geometry: GeometryPointer<T>;
|
|
@@ -69,8 +69,8 @@ export interface ModelMeshItem<T extends BinaryEnv> extends BaseItem {
|
|
|
69
69
|
endBehavior: ItemEndBehavior;
|
|
70
70
|
}
|
|
71
71
|
export interface PrimitiveData {
|
|
72
|
-
geometry:
|
|
73
|
-
material:
|
|
72
|
+
geometry: DataPath;
|
|
73
|
+
material: DataPath;
|
|
74
74
|
}
|
|
75
75
|
export interface SkinData {
|
|
76
76
|
name?: string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 3D渲染模式:将渲染过程中的中间结果输出,主要用于排查渲染效果问题,支持 pbr 和 unlit 材质
|
|
3
|
+
*/
|
|
4
|
+
export var RenderMode3D;
|
|
5
|
+
(function (RenderMode3D) {
|
|
6
|
+
/**
|
|
7
|
+
* 正常渲染
|
|
8
|
+
*/
|
|
9
|
+
RenderMode3D["none"] = "none";
|
|
10
|
+
/**
|
|
11
|
+
* 纹理坐标
|
|
12
|
+
*/
|
|
13
|
+
RenderMode3D["uv"] = "uv";
|
|
14
|
+
/**
|
|
15
|
+
* 世界坐标法线
|
|
16
|
+
*/
|
|
17
|
+
RenderMode3D["normal"] = "normal";
|
|
18
|
+
/**
|
|
19
|
+
* 基础颜色
|
|
20
|
+
*/
|
|
21
|
+
RenderMode3D["basecolor"] = "basecolor";
|
|
22
|
+
/**
|
|
23
|
+
* 基础颜色 Alpha
|
|
24
|
+
*/
|
|
25
|
+
RenderMode3D["alpha"] = "alpha";
|
|
26
|
+
/**
|
|
27
|
+
* 金属度
|
|
28
|
+
*/
|
|
29
|
+
RenderMode3D["metallic"] = "metallic";
|
|
30
|
+
/**
|
|
31
|
+
* 粗超度
|
|
32
|
+
*/
|
|
33
|
+
RenderMode3D["roughness"] = "roughness";
|
|
34
|
+
/**
|
|
35
|
+
* 环境遮蔽
|
|
36
|
+
*/
|
|
37
|
+
RenderMode3D["ao"] = "ao";
|
|
38
|
+
/**
|
|
39
|
+
* 自发光
|
|
40
|
+
*/
|
|
41
|
+
RenderMode3D["emissive"] = "emissive";
|
|
42
|
+
})(RenderMode3D || (RenderMode3D = {}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseItem, ItemEndBehavior } from '../base-item';
|
|
2
2
|
import type { BinaryEnv } from '../../binary';
|
|
3
3
|
import type { SkyboxCubeTexturePointer } from './binary';
|
|
4
|
-
import type { ItemType } from '
|
|
4
|
+
import type { ItemType } from '../../type';
|
|
5
5
|
import type { ComponentData, DataPath } from '../../components';
|
|
6
6
|
export interface SkyboxOptions<T extends BinaryEnv> {
|
|
7
7
|
renderable: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SizeOverLifetime, RotationOverLifetime, PositionOverLifetime, ColorOverLifetime, ItemType } from '../type';
|
|
2
|
-
import type { RGBAColorValue } from '../
|
|
2
|
+
import type { RGBAColorValue } from '../number-expression';
|
|
3
3
|
import type { BaseItem } from './base-item';
|
|
4
4
|
import type { ComponentData, DataPath, EffectsObjectData } from '../components';
|
|
5
5
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { ItemType, RendererOptions, TextureSheetAnimation, BlendingMode, SplitParameter } from '../type';
|
|
2
|
-
import type { FixedNumberExpression, NumberExpression, GradientColor, vec3, FixedVec3Expression, ColorExpression, FunctionExpression } from '../
|
|
2
|
+
import type { FixedNumberExpression, NumberExpression, GradientColor, vec3, FixedVec3Expression, ColorExpression, FunctionExpression } from '../number-expression';
|
|
3
3
|
import type { BaseItem, ItemEndBehavior } from './base-item';
|
|
4
4
|
import type { ParticleShape } from './particle-shape';
|
|
5
|
-
import type {
|
|
6
|
-
import type { ComponentData } from 'src/components';
|
|
5
|
+
import type { ComponentData } from '../components';
|
|
7
6
|
/**
|
|
8
7
|
* 粒子交互行为
|
|
9
8
|
*/
|
|
@@ -334,7 +333,6 @@ export interface ParticleContent {
|
|
|
334
333
|
*/
|
|
335
334
|
radius?: number;
|
|
336
335
|
};
|
|
337
|
-
filter?: DistortionFilterParams;
|
|
338
336
|
}
|
|
339
337
|
/**
|
|
340
338
|
* 粒子元素渲染属性
|
|
@@ -405,7 +403,6 @@ export interface ParticleSystemData extends ComponentData {
|
|
|
405
403
|
*/
|
|
406
404
|
radius?: number;
|
|
407
405
|
};
|
|
408
|
-
filter?: DistortionFilterParams;
|
|
409
406
|
}
|
|
410
407
|
/**
|
|
411
408
|
* 粒子拖尾参数
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 粒子交互行为
|
|
3
|
+
*/
|
|
4
|
+
export var ParticleInteractionBehavior;
|
|
5
|
+
(function (ParticleInteractionBehavior) {
|
|
6
|
+
/**
|
|
7
|
+
* 无
|
|
8
|
+
*/
|
|
9
|
+
ParticleInteractionBehavior[ParticleInteractionBehavior["none"] = 0] = "none";
|
|
10
|
+
/**
|
|
11
|
+
* 移出粒子
|
|
12
|
+
*/
|
|
13
|
+
ParticleInteractionBehavior[ParticleInteractionBehavior["removeParticle"] = 1] = "removeParticle";
|
|
14
|
+
})(ParticleInteractionBehavior || (ParticleInteractionBehavior = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export var ShapeArcMode;
|
|
2
|
+
(function (ShapeArcMode) {
|
|
3
|
+
/**
|
|
4
|
+
* 随机
|
|
5
|
+
*/
|
|
6
|
+
ShapeArcMode[ShapeArcMode["RANDOM"] = 0] = "RANDOM";
|
|
7
|
+
/**
|
|
8
|
+
* 单向循环
|
|
9
|
+
*/
|
|
10
|
+
ShapeArcMode[ShapeArcMode["UNIDIRECTIONAL_CYCLE"] = 1] = "UNIDIRECTIONAL_CYCLE";
|
|
11
|
+
/**
|
|
12
|
+
* 双向循环
|
|
13
|
+
*/
|
|
14
|
+
ShapeArcMode[ShapeArcMode["BIDIRECTIONAL_CYCLE"] = 2] = "BIDIRECTIONAL_CYCLE";
|
|
15
|
+
/**
|
|
16
|
+
* 均匀爆发
|
|
17
|
+
*/
|
|
18
|
+
ShapeArcMode[ShapeArcMode["UNIFORM_BURST"] = 3] = "UNIFORM_BURST";
|
|
19
|
+
})(ShapeArcMode || (ShapeArcMode = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseItem, ItemEndBehavior } from './base-item';
|
|
2
2
|
import type { SizeOverLifetime, RotationOverLifetime, PositionOverLifetime, ColorOverLifetime, ItemType, TextureSheetAnimation, RendererOptions, SplitParameter, InteractBehavior } from '../type';
|
|
3
|
-
import type { RGBAColorValue } from '../
|
|
4
|
-
import type { ComponentData } from '
|
|
3
|
+
import type { RGBAColorValue } from '../number-expression';
|
|
4
|
+
import type { ComponentData } from '../components';
|
|
5
5
|
/**
|
|
6
6
|
* 图层元素
|
|
7
7
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { BaseItem, ItemEndBehavior } from './base-item';
|
|
2
2
|
import type { SizeOverLifetime, RotationOverLifetime, PositionOverLifetime, ColorOverLifetime, ItemType, TextureSheetAnimation, RendererOptions, InteractBehavior } from '../type';
|
|
3
|
-
import type { RGBAColorValue } from '../
|
|
4
|
-
import type { FontStyle, TextAlignment, TextBaseline, TextOverflow, TextWeight } from '
|
|
5
|
-
import type { ComponentData } from '
|
|
3
|
+
import type { RGBAColorValue } from '../number-expression';
|
|
4
|
+
import type { FontStyle, TextAlignment, TextBaseline, TextOverflow, TextWeight } from '../text';
|
|
5
|
+
import type { ComponentData } from '../components';
|
|
6
6
|
/**
|
|
7
7
|
* 文本元素
|
|
8
8
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,7 +5,6 @@ import type { PluginItem } from './item/plugin-item';
|
|
|
5
5
|
import type { ParticleItem } from './item/particle-item';
|
|
6
6
|
import type { InteractItem } from './item/interact-item';
|
|
7
7
|
import type { ModelCameraItem, ModelLightItem, ModelMeshItem, ModelSkyboxItem, ModelTreeItem } from './item/model';
|
|
8
|
-
import type { FilterItem } from './item/filter-item';
|
|
9
8
|
import type { CameraItem } from './item/camera-item';
|
|
10
9
|
import type { CompositionItem } from './item/composition-item';
|
|
11
10
|
import type { TextItem } from './item/text-item';
|
|
@@ -14,4 +13,4 @@ import type { TextItem } from './item/text-item';
|
|
|
14
13
|
* 1.0版本
|
|
15
14
|
* 基类,无对应元素
|
|
16
15
|
*/
|
|
17
|
-
export type Item = SpriteItem | ParticleItem | NullItem | PluginItem | InteractItem |
|
|
16
|
+
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'>;
|
package/es/item.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -150,12 +150,12 @@ export type LinearPathValue = [
|
|
|
150
150
|
* 关键帧类型
|
|
151
151
|
*/
|
|
152
152
|
export declare enum BezierKeyframeType {
|
|
153
|
-
AUTO = 0
|
|
154
|
-
EASE = 1
|
|
155
|
-
EASE_IN = 2
|
|
156
|
-
EASE_OUT = 3
|
|
157
|
-
LINE = 4
|
|
158
|
-
HOLD = 5
|
|
153
|
+
AUTO = 0,// 自动
|
|
154
|
+
EASE = 1,// 缓动
|
|
155
|
+
EASE_IN = 2,// 缓入
|
|
156
|
+
EASE_OUT = 3,// 缓出
|
|
157
|
+
LINE = 4,// 线性 (默认进)
|
|
158
|
+
HOLD = 5,// 定格
|
|
159
159
|
LINE_OUT = 6
|
|
160
160
|
}
|
|
161
161
|
/**
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*********************************************/
|
|
2
|
+
/* 基本数值属性参数 */
|
|
3
|
+
/*********************************************/
|
|
4
|
+
export var ValueType;
|
|
5
|
+
(function (ValueType) {
|
|
6
|
+
/**
|
|
7
|
+
* 常数
|
|
8
|
+
*/
|
|
9
|
+
ValueType[ValueType["CONSTANT"] = 0] = "CONSTANT";
|
|
10
|
+
/**
|
|
11
|
+
* 二维常数向量
|
|
12
|
+
*/
|
|
13
|
+
ValueType[ValueType["CONSTANT_VEC2"] = 1] = "CONSTANT_VEC2";
|
|
14
|
+
/**
|
|
15
|
+
* 三维常数向量
|
|
16
|
+
*/
|
|
17
|
+
ValueType[ValueType["CONSTANT_VEC3"] = 2] = "CONSTANT_VEC3";
|
|
18
|
+
/**
|
|
19
|
+
* 四维常数向量
|
|
20
|
+
*/
|
|
21
|
+
ValueType[ValueType["CONSTANT_VEC4"] = 3] = "CONSTANT_VEC4";
|
|
22
|
+
/**
|
|
23
|
+
* 随机数
|
|
24
|
+
*/
|
|
25
|
+
ValueType[ValueType["RANDOM"] = 4] = "RANDOM";
|
|
26
|
+
/**
|
|
27
|
+
* 直线
|
|
28
|
+
*/
|
|
29
|
+
ValueType[ValueType["LINE"] = 5] = "LINE";
|
|
30
|
+
/**
|
|
31
|
+
* 曲线
|
|
32
|
+
*/
|
|
33
|
+
ValueType[ValueType["CURVE"] = 6] = "CURVE";
|
|
34
|
+
/**
|
|
35
|
+
* 贝塞尔路径
|
|
36
|
+
*/
|
|
37
|
+
ValueType[ValueType["BEZIER_PATH"] = 7] = "BEZIER_PATH";
|
|
38
|
+
/**
|
|
39
|
+
* 颜色
|
|
40
|
+
*/
|
|
41
|
+
ValueType[ValueType["RGBA_COLOR"] = 8] = "RGBA_COLOR";
|
|
42
|
+
/**
|
|
43
|
+
* 渐变色
|
|
44
|
+
*/
|
|
45
|
+
ValueType[ValueType["GRADIENT_COLOR"] = 9] = "GRADIENT_COLOR";
|
|
46
|
+
/**
|
|
47
|
+
* 蒙版形状点集
|
|
48
|
+
*/
|
|
49
|
+
ValueType[ValueType["SHAPE_POINTS"] = 10] = "SHAPE_POINTS";
|
|
50
|
+
/**
|
|
51
|
+
* 蒙版形状切分
|
|
52
|
+
*/
|
|
53
|
+
ValueType[ValueType["SHAPE_SPLITS"] = 11] = "SHAPE_SPLITS";
|
|
54
|
+
/**
|
|
55
|
+
*直线路径
|
|
56
|
+
*/
|
|
57
|
+
ValueType[ValueType["LINEAR_PATH"] = 12] = "LINEAR_PATH";
|
|
58
|
+
/**
|
|
59
|
+
* 多色
|
|
60
|
+
*/
|
|
61
|
+
ValueType[ValueType["COLORS"] = 13] = "COLORS";
|
|
62
|
+
/**
|
|
63
|
+
* 二进制指针
|
|
64
|
+
*/
|
|
65
|
+
ValueType[ValueType["BINARY"] = 20] = "BINARY";
|
|
66
|
+
/**
|
|
67
|
+
* 贝塞尔曲线
|
|
68
|
+
*/
|
|
69
|
+
ValueType[ValueType["BEZIER_CURVE"] = 21] = "BEZIER_CURVE";
|
|
70
|
+
/**
|
|
71
|
+
* 贝塞尔曲线路径
|
|
72
|
+
*/
|
|
73
|
+
ValueType[ValueType["BEZIER_CURVE_PATH"] = 22] = "BEZIER_CURVE_PATH";
|
|
74
|
+
})(ValueType || (ValueType = {}));
|
|
75
|
+
/**
|
|
76
|
+
* 关键帧类型
|
|
77
|
+
*/
|
|
78
|
+
export var BezierKeyframeType;
|
|
79
|
+
(function (BezierKeyframeType) {
|
|
80
|
+
BezierKeyframeType[BezierKeyframeType["AUTO"] = 0] = "AUTO";
|
|
81
|
+
BezierKeyframeType[BezierKeyframeType["EASE"] = 1] = "EASE";
|
|
82
|
+
BezierKeyframeType[BezierKeyframeType["EASE_IN"] = 2] = "EASE_IN";
|
|
83
|
+
BezierKeyframeType[BezierKeyframeType["EASE_OUT"] = 3] = "EASE_OUT";
|
|
84
|
+
BezierKeyframeType[BezierKeyframeType["LINE"] = 4] = "LINE";
|
|
85
|
+
BezierKeyframeType[BezierKeyframeType["HOLD"] = 5] = "HOLD";
|
|
86
|
+
BezierKeyframeType[BezierKeyframeType["LINE_OUT"] = 6] = "LINE_OUT";
|
|
87
|
+
})(BezierKeyframeType || (BezierKeyframeType = {}));
|
|
@@ -7,10 +7,11 @@ import type { BinaryFile } from './binary';
|
|
|
7
7
|
import type { ComponentData, GeometryData, MaterialData, ShaderData } from './components';
|
|
8
8
|
import type { VFXItemData } from './vfx-item-data';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* runtime 2.0 之前的场景信息
|
|
11
11
|
* 素材信息存放于统一数据结构中
|
|
12
|
+
* @deprecated
|
|
12
13
|
*/
|
|
13
|
-
export interface
|
|
14
|
+
export interface JSONSceneLegacy {
|
|
14
15
|
/************** 文件版本不是 Player 版本,应用于文件变更后在 editor/player 中加载时的分类处理 **************/
|
|
15
16
|
/**
|
|
16
17
|
* JSON 版本
|
|
@@ -22,8 +23,10 @@ export interface JSONScene {
|
|
|
22
23
|
* 2.0 改造升级
|
|
23
24
|
* 2.1 增加文本元素
|
|
24
25
|
* 2.2 数据类型兼容
|
|
26
|
+
* 2.3 新增动态视频、陀螺仪支持旋转
|
|
27
|
+
* 2.4 支持贝塞尔曲线
|
|
25
28
|
*/
|
|
26
|
-
version: '1.0' | '1.1' | '1.2' | '1.3' | '1.5' | '1.8' | '2.0' | '2.1' | '2.2';
|
|
29
|
+
version: '1.0' | '1.1' | '1.2' | '1.3' | '1.5' | '1.8' | '2.0' | '2.1' | '2.2' | '2.3' | '2.4';
|
|
27
30
|
/**
|
|
28
31
|
* 播放器版本信息
|
|
29
32
|
*/
|
|
@@ -94,21 +97,15 @@ export interface JSONScene {
|
|
|
94
97
|
*/
|
|
95
98
|
export type SceneRequire = 'filter';
|
|
96
99
|
/**
|
|
97
|
-
*
|
|
100
|
+
* 场景信息
|
|
98
101
|
* 素材信息存放于统一数据结构中
|
|
99
102
|
*/
|
|
100
|
-
export interface
|
|
103
|
+
export interface JSONScene {
|
|
101
104
|
/************** 文件版本不是 Player 版本,应用于文件变更后在 editor/player 中加载时的分类处理 **************/
|
|
102
105
|
/**
|
|
103
106
|
* JSON 版本
|
|
104
107
|
*
|
|
105
|
-
*
|
|
106
|
-
* 1.2 增加 anchor
|
|
107
|
-
* 1.3 增加二进制文件格式
|
|
108
|
-
* 1.5 增加 Spine 数据
|
|
109
|
-
* 2.0 改造升级
|
|
110
|
-
* 2.1 增加文本元素
|
|
111
|
-
* 2.2 数据类型兼容
|
|
108
|
+
* 3.0 EC 改造、移除滤镜元素
|
|
112
109
|
*/
|
|
113
110
|
version: string;
|
|
114
111
|
/**
|
|
@@ -151,10 +148,6 @@ export interface JSONSceneVersion3 {
|
|
|
151
148
|
* 'model@1.0'
|
|
152
149
|
*/
|
|
153
150
|
plugins: string[];
|
|
154
|
-
/**
|
|
155
|
-
* 保留字段
|
|
156
|
-
*/
|
|
157
|
-
requires: SceneRequire[];
|
|
158
151
|
/**
|
|
159
152
|
* 字体资源
|
|
160
153
|
* 数据模板下掉可以不要 FontBase[]
|
package/es/scene.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import type { RGBAColor } from './numberExpression';
|
|
2
|
-
export interface StringTemplate {
|
|
3
|
-
fonts: FontBase[];
|
|
4
|
-
texts: Text[];
|
|
5
|
-
colors: RGBAColor[];
|
|
6
|
-
}
|
|
7
1
|
/**
|
|
8
2
|
* 字体资源
|
|
9
3
|
* @version 2.3
|
|
@@ -171,7 +165,7 @@ export declare enum FontStyle {
|
|
|
171
165
|
/**
|
|
172
166
|
* 正常
|
|
173
167
|
*/
|
|
174
|
-
normal = "normal"
|
|
168
|
+
normal = "normal",// default
|
|
175
169
|
/**
|
|
176
170
|
* 斜体
|
|
177
171
|
*/
|
package/es/text.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export var TextOverflow;
|
|
2
|
+
(function (TextOverflow) {
|
|
3
|
+
/**
|
|
4
|
+
* display 模式下,会显示所有文本,存在文本超过边界框的情况。
|
|
5
|
+
*/
|
|
6
|
+
TextOverflow[TextOverflow["display"] = 0] = "display";
|
|
7
|
+
/**
|
|
8
|
+
* clip 模式下,当文本内容超出边界框时,多余的会被截断。
|
|
9
|
+
*/
|
|
10
|
+
TextOverflow[TextOverflow["clip"] = 1] = "clip";
|
|
11
|
+
/**
|
|
12
|
+
* ellipsis 模式下,会使用(...)来代替超出边界框的内容。
|
|
13
|
+
*/
|
|
14
|
+
TextOverflow[TextOverflow["ellipsis"] = 2] = "ellipsis";
|
|
15
|
+
})(TextOverflow || (TextOverflow = {}));
|
|
16
|
+
export var TextBaseline;
|
|
17
|
+
(function (TextBaseline) {
|
|
18
|
+
/**
|
|
19
|
+
* 文本顶对齐。
|
|
20
|
+
*/
|
|
21
|
+
TextBaseline[TextBaseline["top"] = 0] = "top";
|
|
22
|
+
/**
|
|
23
|
+
* 文本垂直居中对齐。
|
|
24
|
+
*/
|
|
25
|
+
TextBaseline[TextBaseline["middle"] = 1] = "middle";
|
|
26
|
+
/**
|
|
27
|
+
* 文本底对齐。
|
|
28
|
+
*/
|
|
29
|
+
TextBaseline[TextBaseline["bottom"] = 2] = "bottom";
|
|
30
|
+
})(TextBaseline || (TextBaseline = {}));
|
|
31
|
+
export var TextAlignment;
|
|
32
|
+
(function (TextAlignment) {
|
|
33
|
+
/**
|
|
34
|
+
* text alignment starts from(x,y) to right direction
|
|
35
|
+
* 从(x,y)开始第一个字符,向右边延伸
|
|
36
|
+
*/
|
|
37
|
+
TextAlignment[TextAlignment["left"] = 0] = "left";
|
|
38
|
+
/**
|
|
39
|
+
* (x,y) is middle position of text, where (left + right)/2 =(x,y)
|
|
40
|
+
* (x,y) 为文字中间位置,(最左位置 + 最右位置)/2 = (x,y)
|
|
41
|
+
*/
|
|
42
|
+
TextAlignment[TextAlignment["middle"] = 1] = "middle";
|
|
43
|
+
/**
|
|
44
|
+
* text alignment ends with(x,y) from left direction
|
|
45
|
+
* 从(x,y)结束最后一个字符,向左边延伸
|
|
46
|
+
*/
|
|
47
|
+
TextAlignment[TextAlignment["right"] = 2] = "right";
|
|
48
|
+
})(TextAlignment || (TextAlignment = {}));
|
|
49
|
+
/**
|
|
50
|
+
* 文本字重
|
|
51
|
+
*/
|
|
52
|
+
export var TextWeight;
|
|
53
|
+
(function (TextWeight) {
|
|
54
|
+
/**
|
|
55
|
+
* 正常
|
|
56
|
+
*/
|
|
57
|
+
TextWeight["normal"] = "normal";
|
|
58
|
+
/**
|
|
59
|
+
* 粗体
|
|
60
|
+
*/
|
|
61
|
+
TextWeight["bold"] = "bold";
|
|
62
|
+
/**
|
|
63
|
+
* 瘦体
|
|
64
|
+
*/
|
|
65
|
+
TextWeight["lighter"] = "lighter";
|
|
66
|
+
})(TextWeight || (TextWeight = {}));
|
|
67
|
+
/**
|
|
68
|
+
* 文本样式
|
|
69
|
+
*/
|
|
70
|
+
export var FontStyle;
|
|
71
|
+
(function (FontStyle) {
|
|
72
|
+
/**
|
|
73
|
+
* 正常
|
|
74
|
+
*/
|
|
75
|
+
FontStyle["normal"] = "normal";
|
|
76
|
+
/**
|
|
77
|
+
* 斜体
|
|
78
|
+
*/
|
|
79
|
+
FontStyle["italic"] = "italic";
|
|
80
|
+
/**
|
|
81
|
+
* 倾斜体
|
|
82
|
+
*/
|
|
83
|
+
FontStyle["oblique"] = "oblique";
|
|
84
|
+
})(FontStyle || (FontStyle = {}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FixedVec3Expression, vec2, vec3, GradientColor, ShapePoints, ShapeSplits, FixedNumberExpression } from './
|
|
1
|
+
import type { FixedVec3Expression, vec2, vec3, GradientColor, ShapePoints, ShapeSplits, FixedNumberExpression } from './number-expression';
|
|
2
2
|
/**
|
|
3
3
|
* 播放器版本
|
|
4
4
|
*/
|
|
@@ -512,10 +512,6 @@ export declare enum ItemType {
|
|
|
512
512
|
* 预合成元素
|
|
513
513
|
*/
|
|
514
514
|
composition = "7",
|
|
515
|
-
/**
|
|
516
|
-
* 滤镜图层
|
|
517
|
-
*/
|
|
518
|
-
filter = "8",
|
|
519
515
|
/**
|
|
520
516
|
* Spine 元素
|
|
521
517
|
*/
|
|
@@ -539,7 +535,11 @@ export declare enum ItemType {
|
|
|
539
535
|
/**
|
|
540
536
|
* 天空盒元素
|
|
541
537
|
*/
|
|
542
|
-
skybox = "skybox"
|
|
538
|
+
skybox = "skybox",
|
|
539
|
+
/**
|
|
540
|
+
* 特效元素
|
|
541
|
+
*/
|
|
542
|
+
effect = "effect"
|
|
543
543
|
}
|
|
544
544
|
/**
|
|
545
545
|
* 渲染模式
|
|
@@ -612,21 +612,37 @@ export interface PluginGyroscopeTarget {
|
|
|
612
612
|
*/
|
|
613
613
|
name: string;
|
|
614
614
|
/**
|
|
615
|
-
* x
|
|
615
|
+
* x 轴位移最小值
|
|
616
616
|
*/
|
|
617
617
|
xMin: number;
|
|
618
618
|
/**
|
|
619
|
-
* x
|
|
619
|
+
* x 轴位移最大值
|
|
620
620
|
*/
|
|
621
621
|
xMax: number;
|
|
622
622
|
/**
|
|
623
|
-
* y
|
|
623
|
+
* y 轴位移最小值
|
|
624
624
|
*/
|
|
625
625
|
yMin: number;
|
|
626
626
|
/**
|
|
627
|
-
* y
|
|
627
|
+
* y 轴位移最大值
|
|
628
628
|
*/
|
|
629
629
|
yMax: number;
|
|
630
|
+
/**
|
|
631
|
+
* 绕 x 轴(水平)旋转角度最小值
|
|
632
|
+
*/
|
|
633
|
+
hMin: number;
|
|
634
|
+
/**
|
|
635
|
+
* 绕 x 轴(水平)旋转角度最大值
|
|
636
|
+
*/
|
|
637
|
+
hMax: number;
|
|
638
|
+
/**
|
|
639
|
+
* 绕 y 轴(垂直)旋转角度最小值
|
|
640
|
+
*/
|
|
641
|
+
vMin: number;
|
|
642
|
+
/**
|
|
643
|
+
* 绕 y 轴(垂直)旋转角度最大值
|
|
644
|
+
*/
|
|
645
|
+
vMax: number;
|
|
630
646
|
}
|
|
631
647
|
/**
|
|
632
648
|
* 二维蒙版形状属性
|